Aegis  4.25.D505
/home/archives/aegis/branch.4/branch.25/delta28933.505/libaegis/change/identifier.h
Go to the documentation of this file.
00001 //
00002 // aegis - project change supervisor
00003 // Copyright (C) 2004-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_IDENTIFIER_H
00020 #define LIBAEGIS_CHANGE_IDENTIFIER_H
00021 
00022 #include <libaegis/change/identifi_sub.h>
00023 #include <libaegis/file_revision.h>
00024 #include <libaegis/project/identifi_sub/plain.h>
00025 #include <libaegis/project/identifi_sub/branch.h>
00026 
00037 class change_identifier
00038 {
00039 public:
00044     ~change_identifier();
00045 
00049     change_identifier();
00050 
00055     bool set(void) const { return change_id.set(); }
00056 
00061     bool project_set(void) const { return project_id.set(); }
00062 
00123     void
00124     command_line_parse(void (*usage)(void))
00125     {
00126         change_id.command_line_parse(usage);
00127     }
00128 
00135     void command_line_parse_rest(void (*usage)(void));
00136 
00137     bool get_devdir(void) { return change_id.get_devdir(); }
00138 
00144     void
00145     command_line_check(void (*usage)(void))
00146     {
00147         change_id.command_line_check(usage);
00148     }
00149 
00154     void set_baseline(void) { change_id.set_baseline(); }
00155 
00160     bool get_baseline(void) { return change_id.get_baseline(); }
00161 
00172     file_revision
00173     get_file_revision(const nstring &filename, change_functor &bad_state)
00174     {
00175         return change_id.get_file_revision(filename, bad_state);
00176     }
00177 
00189     file_revision
00190     get_file_revision(fstate_src_ty *src, change_functor &bad_state)
00191     {
00192         return change_id.get_file_revision(src, bad_state);
00193     }
00194 
00199     void
00200     get_project_file_names(nstring_list &results)
00201     {
00202         change_id.get_project_file_names(results);
00203     }
00204 
00214     fstate_src_ty *
00215     get_project_file(const nstring &file_name)
00216     {
00217         return change_id.get_project_file(file_name);
00218     }
00219 
00234     project_file_roll_forward *
00235     get_historian(bool detailed = false)
00236     {
00237         return change_id.get_historian(detailed);
00238     }
00239 
00244     nstring
00245     get_change_version_string(void)
00246     {
00247         return change_id.get_change_version_string();
00248     }
00249 
00254     project *
00255     get_pp(void)
00256     {
00257         return branch_id.get_pp();
00258     }
00259 
00264     user_ty::pointer
00265     get_up(void)
00266     {
00267         return branch_id.get_up();
00268     }
00269 
00278     void set_user_by_name(nstring &login) { branch_id.set_user_by_name(login); }
00279 
00284     change::pointer
00285     get_cp(void)
00286     {
00287         return change_id.get_cp();
00288     }
00289 
00295     change::pointer
00296     get_bogus_cp(void)
00297     {
00298         return change_id.get_bogus_cp();
00299     }
00300 
00308     long
00309     get_change_number(void)
00310     {
00311         return change_id.get_change_number();
00312     }
00313 
00319     void
00320     error_if_no_explicit_change_number(void)
00321     {
00322         change_id.error_if_no_explicit_change_number();
00323     }
00324 
00330     void
00331     error_if_no_explicit_delta(void)
00332     {
00333         change_id.error_if_no_explicit_delta();
00334     }
00335 
00342     void invalidate_change_meta_data(void) { change_id.invalidate_meta_data(); }
00343 
00351     void set_delta_from_baseline(void) { change_id.set_delta_from_baseline(); }
00352 
00360     void
00361     set_delta_from_branch_head(void)
00362     {
00363         change_id.set_delta_from_branch_head();
00364     }
00365 
00366 private:
00371     project_identifier_subset_plain project_id;
00372 
00377     project_identifier_subset_branch branch_id;
00378 
00383     change_identifier_subset change_id;
00384 
00388     change_identifier(const change_identifier &);
00389 
00393     change_identifier &operator=(const change_identifier &);
00394 };
00395 
00396 #endif // LIBAEGIS_CHANGE_IDENTIFIER_H
00397 // vim: set ts=8 sw=4 et :