|
Aegis
4.25.D505
|
00001 // 00002 // aegis - project change supervisor 00003 // Copyright (C) 2004-2008, 2011, 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_CHANGE_IDENTIFI_SUB_H 00020 #define LIBAEGIS_CHANGE_IDENTIFI_SUB_H 00021 00022 #include <libaegis/change.h> 00023 #include <libaegis/file_revision.h> 00024 #include <libaegis/project/identifi_sub/branch.h> 00025 00026 class change_functor; // forward 00027 struct fstate_src_ty; // forward 00028 class nstring_list; // forward 00029 class project_file_roll_forward; // forward 00030 struct project; // forward 00031 struct user_ty; // forward 00032 00040 class change_identifier_subset 00041 { 00042 public: 00047 ~change_identifier_subset(); 00048 00052 change_identifier_subset(project_identifier_subset &arg); 00053 00058 bool set(void) const; 00059 00085 void command_line_parse(void (*usage)(void)); 00086 00092 void command_line_check(void (*usage)(void)); 00093 00098 void set_baseline(void) { baseline = true; } 00099 00104 bool get_baseline(void) { return baseline; } 00105 00110 bool get_devdir(void); 00111 00117 void set_project(void); 00118 00124 void set_change(void); 00125 00137 file_revision get_file_revision(const nstring &filename, 00138 change_functor &bad_state); 00139 00151 file_revision get_file_revision(fstate_src_ty *src, 00152 change_functor &bad_state); 00153 00164 void get_project_file_names(nstring_list &results); 00165 00175 fstate_src_ty *get_project_file(const nstring &file_name); 00176 00181 void set_project_name(string_ty *); 00182 00187 nstring get_change_version_string(void); 00188 00193 project *get_pp(void) { return pid.get_pp(); } 00194 00199 user_ty::pointer get_up(void) { return pid.get_up(); } 00200 00209 void set_user_by_name(nstring &login) { pid.set_user_by_name(login); } 00210 00215 change::pointer get_cp(void); 00216 00221 change::pointer get_bogus_cp(void); 00222 00230 long get_change_number(void); 00231 00237 void error_if_no_explicit_change_number(void); 00238 00244 void error_if_no_explicit_delta(void); 00245 00260 project_file_roll_forward *get_historian(bool detailed = false); 00261 00268 void invalidate_meta_data(void); 00269 00277 void set_delta_from_baseline(void); 00278 00286 void set_delta_from_branch_head(void); 00287 00288 private: 00293 project_identifier_subset_branch pid; 00294 00295 enum { NO_TIME_SET = -1 }; 00296 00301 bool baseline; 00302 00307 bool devdir; 00308 00313 long change_number; 00314 00320 long delta_date; 00321 00326 nstring delta_name; 00327 00332 long delta_number; 00333 00338 change::pointer cp; 00339 00345 project_file_roll_forward *historian_p; 00346 00352 bool need_historical_perspective(void) const; 00353 00357 change_identifier_subset(); 00358 00362 change_identifier_subset(const change_identifier_subset &); 00363 00367 change_identifier_subset &operator=(const change_identifier_subset &); 00368 }; 00369 00370 #endif // LIBAEGIS_CHANGE_IDENTIFI_SUB_H 00371 // vim: set ts=8 sw=4 et :
1.7.6.1