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

#include <identifi_sub.h>

Public Member Functions

 ~change_identifier_subset ()
 change_identifier_subset (project_identifier_subset &arg)
bool set (void) const
void command_line_parse (void(*usage)(void))
void command_line_check (void(*usage)(void))
void set_baseline (void)
bool get_baseline (void)
bool get_devdir (void)
void set_project (void)
void set_change (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)
void set_project_name (string_ty *)
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)
project_file_roll_forwardget_historian (bool detailed=false)
void invalidate_meta_data (void)
void set_delta_from_baseline (void)
void set_delta_from_branch_head (void)

Private Types

enum  { NO_TIME_SET = -1 }

Private Member Functions

bool need_historical_perspective (void) const
 change_identifier_subset ()
 change_identifier_subset (const change_identifier_subset &)
change_identifier_subsetoperator= (const change_identifier_subset &)

Private Attributes

project_identifier_subset_branch pid
bool baseline
bool devdir
long change_number
long delta_date
nstring delta_name
long delta_number
change::pointer cp
project_file_roll_forwardhistorian_p

Detailed Description

The change_identifier_subset class is used to represent a change and its context, as identified by all the diffent command line options used to specify a change set. It only operates on the change portion of the identification; the project portion is a separate class and instance.

Definition at line 40 of file identifi_sub.h.


Member Enumeration Documentation

anonymous enum [private]
Enumerator:
NO_TIME_SET 

Definition at line 295 of file identifi_sub.h.


Constructor & Destructor Documentation

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

The constructor.

The default constructor. Do not use.

The copy constructor. Do not use.


Member Function Documentation

void change_identifier_subset::command_line_check ( void(*)(void)  usage)

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

void change_identifier_subset::command_line_parse ( void(*)(void)  usage)

The command_line_parse method is used to parse command line options (via the arglex() fucntion) 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 -Development_Directory -BRanch number -TRunk -GrandParent -DELta number -DELta name -DELta_Date when [ -Project ] string

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. If is often the case that threr are actually *two* changes being identified, and they will split the arguments between them.

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.

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).

bool change_identifier_subset::get_baseline ( void  ) [inline]

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

Definition at line 104 of file identifi_sub.h.

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

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().

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

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

The get_devdir method is used to determine of the --Development-Directory option has been given, or is implied.

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 in question
bad_stateWhat to do if the change is in an inappropriate state for this operation.

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 file meta data (revions, if set, will be ignored)
bad_stateWhat to do if the change is in an inappropriate state for this operation.

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

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.

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

Definition at line 193 of file identifi_sub.h.

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.

The get_project_files method is used to obtain a list of the project's file, taking --delta options into account if specified.

Parameters:
resultsThe string list to which the file names are appended.
Note:
You can't specify a view path, it defaults to view_path_simple.

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

Definition at line 199 of file identifi_sub.h.

The invalidate_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.

The need_historical_perspective method is used to determine whether or not access to project files should be direct (false) or via the historian (false).

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

The assignment operator. Do not use.

bool change_identifier_subset::set ( void  ) const

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

void change_identifier_subset::set_baseline ( void  ) [inline]

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

Definition at line 98 of file identifi_sub.h.

The set_change method is used after the set_project method has been called. It is used to bind to the appropriate change.

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.

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.

The set_project method is used after the command_line_check method has been called. It is used to bind to the appropriate project for the change identified.

The set_project_name method is used to set the name of the project to be accessed.

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 209 of file identifi_sub.h.


Field Documentation

The baseline instance variable is used to remember wether or not the --baseline command line option has been specified.

Definition at line 301 of file identifi_sub.h.

The change_number instance variable is used to remember any --change command line option specified. This could be implicit.

Definition at line 313 of file identifi_sub.h.

The cp instance variable is used to remember which change we are bound to.

Definition at line 338 of file identifi_sub.h.

The delta_date instance variable is used to remember any --delta-date command line option specified. This could be implicit.

Definition at line 320 of file identifi_sub.h.

The delta_name instance variable is used to remember any --delta-name command line option specified.

Definition at line 326 of file identifi_sub.h.

The delta_number instance variable is used to remember any --delta command line option specified. This could be implicit.

Definition at line 332 of file identifi_sub.h.

The devdir instance variable is used to remember wether or not the --devdir command line option has been specified.

Definition at line 307 of file identifi_sub.h.

The historian_p instance variable is used to remember the location of the historical file reconstructor. Shall only be accessed by the get_historian method.

Definition at line 345 of file identifi_sub.h.

The pid instance variable is used to remember which project goes with this change.

Definition at line 293 of file identifi_sub.h.


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