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_ty *pp, time_t limit, int detailed)
void set (project_ty *pp, time_t limit, int 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)
file_eventget_older (const nstring &filename)
file_eventget_older (string_ty *filename)
void keys (nstring_list &file_name_list)
bool is_set () const
change::pointer get_last_change () const

Private Member Functions

file_event_list::pointer get_by_uuid (string_ty *uuid)
time_t recapitulate (project_ty *pp, time_t limit, int 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 36 of file roll_forward.h.


Constructor & Destructor Documentation

virtual project_file_roll_forward::~project_file_roll_forward (  )  [virtual]

The destructor.

project_file_roll_forward::project_file_roll_forward (  ) 

The default constructor.

project_file_roll_forward::project_file_roll_forward ( project_ty pp,
time_t  limit,
int  detailed 
)

See the set() method for documentation.

project_file_roll_forward::project_file_roll_forward ( const project_file_roll_forward  )  [private]

The copy constructor. Do not use.


Member Function Documentation

void project_file_roll_forward::set ( project_ty pp,
time_t  limit,
int  detailed 
)

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

Parameters:
pp The project to apply the listing to. All parent branches will be visited, too.
limit The time limit for changes. Changes on or before this time will be included.
detailed If 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.

file_event_list::pointer project_file_roll_forward::get ( fstate_src_ty src  ) 

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

Parameters:
src The 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.

file_event_list::pointer project_file_roll_forward::get ( cstate_src_ty src  ) 

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:
src The 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.

file_event_list::pointer project_file_roll_forward::get ( const nstring filename  ) 

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

Parameters:
filename The 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.

file_event_list::pointer project_file_roll_forward::get ( string_ty filename  ) 

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

Parameters:
filename The 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.

file_event* project_file_roll_forward::get_last ( const nstring filename  ) 

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

Parameters:
filename The 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.

file_event* project_file_roll_forward::get_last ( string_ty filename  ) 

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

Parameters:
filename The 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.

file_event* project_file_roll_forward::get_last ( fstate_src_ty src  ) 

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

Parameters:
src The 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.

file_event* project_file_roll_forward::get_older ( const nstring filename  ) 

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

Parameters:
filename The 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.

file_event* project_file_roll_forward::get_older ( string_ty filename  ) 

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

Parameters:
filename The 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.

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_list Where to put the list of file names.

bool project_file_roll_forward::is_set (  )  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 227 of file roll_forward.h.

change::pointer project_file_roll_forward::get_last_change (  )  const

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

file_event_list::pointer project_file_roll_forward::get_by_uuid ( string_ty uuid  )  [private]

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

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

time_t project_file_roll_forward::recapitulate ( project_ty pp,
time_t  limit,
int  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:
pp The project to recapitulate.
limit The lime linit; any events after this will be ignored.
detailed If 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).

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

The assignment operator. Do not use.


Field Documentation

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 251 of file roll_forward.h.

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 258 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 264 of file roll_forward.h.

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

Definition at line 270 of file roll_forward.h.


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

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