change_identifier_subset Class Reference

#include <identifi_sub.h>


Public Member Functions

 ~change_identifier_subset ()
 change_identifier_subset (project_identifier_subset &arg)
bool set () const
void command_line_parse (void(*usage)(void))
void command_line_check (void(*usage)(void))
void set_baseline ()
bool get_baseline ()
bool get_devdir ()
void set_project ()
void set_change ()
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 ()
project_tyget_pp ()
user_ty::pointer get_up ()
void set_user_by_name (nstring &login)
change::pointer get_cp ()
long get_change_number ()
void error_if_no_explicit_change_number ()
project_file_roll_forwardget_historian ()
void invalidate_meta_data ()

Private Types

enum  { NO_TIME_SET = -1 }

Private Member Functions

bool need_historical_perspective () 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 41 of file identifi_sub.h.


Member Enumeration Documentation

anonymous enum [private]

Enumerator:
NO_TIME_SET 

Definition at line 260 of file identifi_sub.h.


Constructor & Destructor Documentation

change_identifier_subset::~change_identifier_subset (  ) 

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

change_identifier_subset::change_identifier_subset ( project_identifier_subset arg  ) 

The constructor.

change_identifier_subset::change_identifier_subset (  )  [private]

The default constructor. Do not use.

change_identifier_subset::change_identifier_subset ( const change_identifier_subset  )  [private]

The copy constructor. Do not use.


Member Function Documentation

bool change_identifier_subset::set (  )  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::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.

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::set_baseline (  )  [inline]

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

Definition at line 99 of file identifi_sub.h.

bool change_identifier_subset::get_baseline (  )  [inline]

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

Definition at line 105 of file identifi_sub.h.

bool change_identifier_subset::get_devdir (  ) 

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

void change_identifier_subset::set_project (  ) 

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.

void change_identifier_subset::set_change (  ) 

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

file_revision change_identifier_subset::get_file_revision ( const nstring filename,
change_functor bad_state 
)

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:
filename The name of the file in question
bad_state What to do if the change is in an inappropriate state for this operation.

file_revision change_identifier_subset::get_file_revision ( fstate_src_ty src,
change_functor bad_state 
)

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

void change_identifier_subset::get_project_file_names ( nstring_list results  ) 

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

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

fstate_src_ty* change_identifier_subset::get_project_file ( const nstring file_name  ) 

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

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

void change_identifier_subset::set_project_name ( string_ty  ) 

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

nstring change_identifier_subset::get_change_version_string (  ) 

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

project_ty* change_identifier_subset::get_pp (  )  [inline]

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

Definition at line 194 of file identifi_sub.h.

user_ty::pointer change_identifier_subset::get_up (  )  [inline]

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

Definition at line 200 of file identifi_sub.h.

void change_identifier_subset::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:
login The login name of the user.

Definition at line 210 of file identifi_sub.h.

change::pointer change_identifier_subset::get_cp (  ) 

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

long change_identifier_subset::get_change_number (  ) 

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

void change_identifier_subset::error_if_no_explicit_change_number (  ) 

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.

project_file_roll_forward* change_identifier_subset::get_historian (  ) 

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

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.

void change_identifier_subset::invalidate_meta_data (  ) 

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.

bool change_identifier_subset::need_historical_perspective (  )  const [private]

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.


Field Documentation

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

Definition at line 258 of file identifi_sub.h.

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

Definition at line 266 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 272 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 278 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 285 of file identifi_sub.h.

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

Definition at line 291 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 297 of file identifi_sub.h.

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

Definition at line 303 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 310 of file identifi_sub.h.


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

Generated on Wed Mar 12 23:37:39 2008 for Aegis by  doxygen 1.5.5