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

#include <roll_forward.h>

Public Member Functions

virtual ~project_file_roll_forward ()
 project_file_roll_forward ()
 project_file_roll_forward (project *pp, time_t limit, bool detailed)
void set (project *pp, time_t limit, bool detailed)
file_event_list::pointer get (fstate_src_ty *src)
file_event_list::pointer get (cstate_src_ty *src)
file_event_list::pointer get (const nstring &filename)
file_event_list::pointer get (string_ty *filename)
file_eventget_last (const nstring &filename)
file_eventget_last (string_ty *filename)
file_eventget_last (fstate_src_ty *src)
nstring_list get_last_dir (const nstring &dirname)
nstring get_last_fuzzy (const nstring &filename)
file_eventget_older (const nstring &filename)
file_eventget_older (string_ty *filename)
void keys (nstring_list &file_name_list)
bool is_set (void) const
change::pointer get_last_change (void) const

Private Member Functions

file_event_list::pointer get_by_uuid (string_ty *uuid)
time_t recapitulate (project *pp, time_t limit, bool detailed)
 project_file_roll_forward (const project_file_roll_forward &)
project_file_roll_forwardoperator= (const project_file_roll_forward &)

Private Attributes

symtab< file_event_list::pointeruuid_to_felp
symtab< string_tyfilename_to_uuid
time_t stp_time
change::pointer last_change

Detailed Description

Definition at line 35 of file roll_forward.h.


Constructor & Destructor Documentation

The destructor.

The default constructor.

project_file_roll_forward::project_file_roll_forward ( project pp,
time_t  limit,
bool  detailed 
)

See the set() method for documentation.

Parameters:
ppThe project to apply the listing to. All parent branches will be visited, too.
limitThe time limit for changes. Changes on or before this time will be included.
detailedIf this is false, only the parent branches and the project itself are visited. If this is true, all branches completed within the limt will be visited.

The copy constructor. Do not use.


Member Function Documentation

The get method is used to obtain the events for a given file.

Parameters:
srcThe file description of the file to fetch the event list. Will use the uuid if available (or, for backwards compatibility) the file name.
Returns:
Pointer to the event list for the named file, or NULL if the file has never existed at the time (delta) specified.
Note:
Do not free the change pointed to, as it may be referenced by other files' histories.

The get method is used to obtain the events for a given file, once project_file_roll_forward has been called to construct the information.

Parameters:
srcThe file description of the file to fetch the event list. Will use the uuid if available (or, for backwards compatibility) the file name.
Returns:
Pointer to the event list for the named file, or NULL if the file has never existed at the time (delta) specified.
Note:
Do not free the change pointed to, as it may be referenced by other files' histories.

The get method is used to obtain the events for a given file.

Parameters:
filenameThe name of the file to fetch the event list
Returns:
Pointer to the event list for the named file, or NULL if the file has never existed at the time (delta) specified.
Note:
Do not free the change pointed to, as it may be referenced by other files' histories.

The get function is used to obtain the events for a given file.

Parameters:
filenameThe name of the file to fetch the event list
Returns:
Pointer to the event list for the named file, or NULL if the file has never existed at the time (delta) specified.
Note:
Do not free the change pointed to, as it may be referenced by other files' histories.
This method will be DEPRECATED one day.

The get_by_uuid method is used by several of the simpler get methods, once they have performed the uuid-or-filename transform.

Parameters:
uuidThe UUID of the file, if it has one, otherwise the name of the file.

The get_last method is used to get the last file event, used by most functions which deal with deltas.

Parameters:
filenameThe name of the file to fetch the last event
Returns:
Pointer to the last event for the named file, or NULL if the file has never existed at the time (delta) specified.

The get_last method is used to get the last file event, used by most functions which deal with deltas.

Parameters:
filenameThe name of the file to fetch the last event
Returns:
Pointer to the last event for the named file, or NULL if the file has never existed at the time (delta) specified.
Note:
This method will be DEPRECATED one day.

The get_last method is used to get the last file event, using the file's meta data to identify it.

Parameters:
srcThe meta-data describing the file (any revision data, if present, will be ignored)
Returns:
Pointer to the last event for the named file, or NULL if the file has never existed at the time (delta) specified.

The get_last_change method is used to get the pointer to the last change set in the reconstructed history.

The get_last_dir method is used to examine possible get_last candidates, looking for those that may fall within the given directory.

Parameters:
dirnameThe name of a directory to search for files.
Returns:
The empty list of there are no candidates, or a list of one or more files, if the directory contained some files. Also, if it was a file and not a directory, a list of one filename will be returned.

The get_last_fuzzy method is used to find the filename closest to the given filename.

Parameters:
filenamethe name of the file to look for.
Returns:
the most similar file name, or the empty string if none are sufficiently close.

The get_older method is used to get the last-but-one file event, used by e.g. aecp -rescind to roll back a change.

Parameters:
filenameThe name of the file to fetch the last event
Returns:
Pointer to the last event for the named file, or NULL if the file has never existed at the time (delta) specified.

The get_older function is used to get the last-but-one file event, e.g. used by aecp -rescind to roll back a change.

Parameters:
filenameThe name of the file to fetch the last event
Returns:
Pointer to the last event for the named file, or NULL if the file has never existed at the time (delta) specified.
Note:
This method will be DEPRECATED one day.
bool project_file_roll_forward::is_set ( void  ) const [inline]

The is_set method is used to determine if the set method has been invoked, directly or indirectly.

Returns:
bool: true if it has been set, false if not.

Definition at line 257 of file roll_forward.h.

void project_file_roll_forward::keys ( nstring_list file_name_list)

The keys method is used to get a list of filenames for which file event lists are available.

Parameters:
file_name_listWhere to put the list of file names.
project_file_roll_forward& project_file_roll_forward::operator= ( const project_file_roll_forward ) [private]

The assignment operator. Do not use.

time_t project_file_roll_forward::recapitulate ( project pp,
time_t  limit,
bool  detailed 
) [private]

The recapitulate method is used to replay the changes of a branch, indexing each file as it goes. It recurses into parent branches.

Parameters:
ppThe project to recapitulate.
limitThe lime linit; any events after this will be ignored.
detailedIf true, also recurse into child branches, this gives the maximum amount of detail available, but usually of interests to humans (listings) rather than for file content (aecp & co).
Returns:
The latest time found in any event (<= limit).
void project_file_roll_forward::set ( project pp,
time_t  limit,
bool  detailed 
)

The set method is used to recapitilate the project's history, constructing information about the state of all files as it goes. The get function is used to extract the results.

Parameters:
ppThe project to apply the listing to. All parent branches will be visited, too.
limitThe time limit for changes. Changes on or before this time will be included.
detailedIf this is false, only the parent branches and the project itself are visited. If this is true, all branches completed within the limt will be visited.
Note:
This function is one really big memory leak.

Field Documentation

The filename_to_uuid method is used to map user perception of filename (which can vary over time) to the file's UUID (which is invariant).

Definition at line 288 of file roll_forward.h.

The last_change instance variable is used to remember the last change in the historical reconstruction.

Definition at line 300 of file roll_forward.h.

The stp_time instance variable is used to remember the most recent event for any file for the whole reconstruction.

Definition at line 294 of file roll_forward.h.

The uuid_to_felp instance variable is used to remember the mapping from UUIS to file history (for backwards compatibility, index by filename if no UUID is available).

Definition at line 281 of file roll_forward.h.


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