|
Aegis
4.25.D505
|
00001 // 00002 // aegis - project change supervisor 00003 // Copyright (C) 2001-2006, 2008, 2012 Peter Miller 00004 // 00005 // This program is free software; you can redistribute it and/or modify 00006 // it under the terms of the GNU General Public License as published by 00007 // the Free Software Foundation; either version 3 of the License, or (at 00008 // your option) any later version. 00009 // 00010 // This program is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 // General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU General Public License 00016 // along with this program. If not, see <http://www.gnu.org/licenses/>. 00017 // 00018 00019 #ifndef LIBAEGIS_PATCH_H 00020 #define LIBAEGIS_PATCH_H 00021 00022 #include <libaegis/common.fmtgen.h> 00023 #include <libaegis/patch/hunk_list.h> 00024 #include <common/str_list.h> 00025 00030 class patch_ty 00031 { 00032 public: 00036 ~patch_ty(); 00037 00041 patch_ty(); 00042 00047 void append(patch_hunk_ty *php); 00048 00049 // private: 00050 string_list_ty name; 00051 file_action_ty action; 00052 file_usage_ty usage; 00053 patch_hunk_list_ty actions; 00054 00055 private: 00059 patch_ty(const patch_ty &); 00060 00064 patch_ty &operator=(const patch_ty &); 00065 }; 00066 00067 struct input_ty; // forward 00068 00069 bool patch_apply(patch_ty *, string_ty *, string_ty *); 00070 00071 inline patch_ty * 00072 patch_new(void) 00073 { 00074 return new patch_ty(); 00075 } 00076 00077 inline void 00078 patch_delete(patch_ty *pp) 00079 { 00080 delete pp; 00081 } 00082 00083 inline void 00084 patch_append(patch_ty *pp, patch_hunk_ty *php) 00085 { 00086 pp->append(php); 00087 } 00088 00089 #endif // LIBAEGIS_PATCH_H 00090 // vim: set ts=8 sw=4 et :
1.7.6.1