Aegis  4.25.D505
Public Member Functions | Private Member Functions | Private Attributes
change_identifier Class Reference

#include <identifier.h>

Public Member Functions

 ~change_identifier ()
 change_identifier ()
bool set (void) const
bool project_set (void) const
void command_line_parse (void(*usage)(void))
void command_line_parse_rest (void(*usage)(void))
bool get_devdir (void)
void command_line_check (void(*usage)(void))
void set_baseline (void)
bool get_baseline (void)
file_revision get_file_revision (const nstring &filename, change_functor &bad_state)
file_revision get_file_revision (fstate_src_ty *src, change_functor &bad_state)
void get_project_file_names (nstring_list &results)
fstate_src_tyget_project_file (const nstring &file_name)
project_file_roll_forwardget_historian (bool detailed=false)
nstring get_change_version_string (void)
projectget_pp (void)
user_ty::pointer get_up (void)
void set_user_by_name (nstring &login)
change::pointer get_cp (void)
change::pointer get_bogus_cp (void)
long get_change_number (void)
void error_if_no_explicit_change_number (void)
void error_if_no_explicit_delta (void)
void invalidate_change_meta_data (void)
void set_delta_from_baseline (void)
void set_delta_from_branch_head (void)

Private Member Functions

 change_identifier (const change_identifier &)
change_identifieroperator= (const change_identifier &)

Private Attributes

project_identifier_subset_plain project_id
project_identifier_subset_branch branch_id
change_identifier_subset change_id

Detailed Description

The change_identifier class is used to represent a change and its context, as identified by all the different command line options used to specify a change set.

This class is a compound of the change_identifier_subset class and the project_identifier_subset class, because they are most commonly used together. The various methods are proxied to the appropriate instance variables.

Definition at line 37 of file identifier.h.


Constructor & Destructor Documentation

The destructor. It isn't virtual; thou shalt not derive from this class.

The default constructor.

The copy constructor. Do not use.


Member Function Documentation

void change_identifier::command_line_check ( void(*)(void)  usage) [inline]

The command_line_check method is used to verify that sensible command line options have been specified, once the parse has completed.

Definition at line 145 of file identifier.h.

void change_identifier::command_line_parse ( void(*)(void)  usage) [inline]

The command_line_parse method is used to parse command line options (via the arglex() function) to set the change ID. The current token is expected to be meaningful for identifying a change. The position will be advanced past all relevant tokens.

It understands all of the following command line options: -BaseLine [ -Change] number -Change_From_Delta number -BRanch number -TRunk -GrandParent -DELta number -DELta name -DELta_Date when -Developmen_Directory [ -Project ] string

The command line parsing looks something like this:
Note:
There is no need to pass all of these command line options to this function for processing. Only pass those options which make sense. It is often the case that there are actually *two* changes being identified, and they will split the arguments between them.

Definition at line 124 of file identifier.h.

void change_identifier::command_line_parse_rest ( void(*)(void)  usage)

The command_line_parse_rest method is used to parse the rest of the command line. It will call arglex(), command_line_parse, command_line_check, and generic_argument() to perform this processing.

The error_if_no_explicit_change_number is used to emit a fatal_intl error if no change number was specified on the command line.

Definition at line 320 of file identifier.h.

The error_if_no_explicit_delta is used to emit a fatal_intl error if no delta number was specified on the command line (in any of the several forms).

Definition at line 331 of file identifier.h.

bool change_identifier::get_baseline ( void  ) [inline]

The get_baseline method is used to determine whether the --baseline option has been specified.

Definition at line 160 of file identifier.h.

The get_bogus_cp method is used to get the change pointer for the change identified. It is an error if the use specified a real change.

Definition at line 296 of file identifier.h.

long change_identifier::get_change_number ( void  ) [inline]

The get_change_number method is used to obtain the change number for the identified change.

Note:
There is no need to call magic_zero_decode().

Definition at line 309 of file identifier.h.

The get_change_version_string method is used to get the version string for the change.

Definition at line 245 of file identifier.h.

The get_cp method is used to get the change pointer for the change identified.

Definition at line 285 of file identifier.h.

bool change_identifier::get_devdir ( void  ) [inline]

Definition at line 137 of file identifier.h.

file_revision change_identifier::get_file_revision ( const nstring filename,
change_functor bad_state 
) [inline]

The get_file_revision is used to determine the path to the given file at the time specified by the change ID. It must be called after the set_change method has been called.

Parameters:
filenamethe name of the file of interest
bad_statewhat to do if the change is not in an appropriate state

Definition at line 173 of file identifier.h.

The get_file_revision is used to determine the path to the given file at the time specified by the change ID. It must be called after the set_change method has been called.

Parameters:
srcThe meta data identifying the file (revison data, if set, will be ignored)
bad_statewhat to do if the change is not in an appropriate state

Definition at line 190 of file identifier.h.

project_file_roll_forward* change_identifier::get_historian ( bool  detailed = false) [inline]

The get_historian method is used to obtain the location of the historical file records reconstruction.

Parameters:
detailedtrue if you want a detailed history (recurse into branch contents), or false if the simple report is enough. The default is not to provide a detailed listing.
Note:
This function is a failure of the API to conceal this. Eventually it would be nice if all the users of this could be refactored to hide it again.

Definition at line 235 of file identifier.h.

project* change_identifier::get_pp ( void  ) [inline]

The get_pp method is used to get the project pointer for the change identified.

Definition at line 255 of file identifier.h.

fstate_src_ty* change_identifier::get_project_file ( const nstring file_name) [inline]

The get_project_file method is used to obtain the details about a named file, taking any --delta* options into account.

Parameters:
file_nameThe name of the file of interest.
Returns:
pointer to file details, or NULL of the file does not exist.

Definition at line 215 of file identifier.h.

The get_project_file_names method is used to obtain the list of project file names, taking into account and --delta* options.

Definition at line 200 of file identifier.h.

The get_up method is used to get the user pointer for the change identified.

Definition at line 265 of file identifier.h.

The invalidate_change_meta_data method is used to discard cached information about the change. This is usually necessary when a sub-command is run and that subcommand would update the change meta-data.

Definition at line 342 of file identifier.h.

change_identifier& change_identifier::operator= ( const change_identifier ) [private]

The assignment operator. Do not use.

bool change_identifier::project_set ( void  ) const [inline]

The project_set method is used to determine if the project name has been set yet (via any of several command line options).

Definition at line 61 of file identifier.h.

bool change_identifier::set ( void  ) const [inline]

The set method is used to determine if this change ID has been set yet (via any of several command line options).

Definition at line 55 of file identifier.h.

void change_identifier::set_baseline ( void  ) [inline]

The set_baseline method is used to specify that the baseline is the change being identified.

Definition at line 154 of file identifier.h.

The set_delta_from_baseline method may be used to set the change from the the change of the branch (the baseline).

Note:
Only call if the set method returns false.

Definition at line 351 of file identifier.h.

The set_delta_from_branch_head method may be used to set the change from the current head revision of the branch.

Note:
Only call if the set method returns false.

Definition at line 361 of file identifier.h.

void change_identifier::set_user_by_name ( nstring login) [inline]

The set_user_by_name method is used to set the user name by name. This is useful for the small set of command which accept a user name on the command line.

Parameters:
loginThe login name of the user.

Definition at line 278 of file identifier.h.


Field Documentation

The branch_id instance variable is used to remember the branch subset of identifying a change.

Definition at line 377 of file identifier.h.

The change_id instance variable is used to remember the change subset of identifying a change.

Definition at line 383 of file identifier.h.

The branch_id instance variable is used to remember the project subset of identifying a change.

Definition at line 371 of file identifier.h.


The documentation for this class was generated from the following file: