Main Page | Class List | File List | Class Members

CVersion Class Reference

#include <version.h>

List of all members.

Public Member Functions

virtual ~CVersion ()
void AddFileVersion (char *file, char *date, char *version)
std::vector< CVersionRecord * > * GetVersionRecords ()

Static Public Member Functions

static CVersionGetInstance ()
static int compareFunction (CVersionRecord *a, CVersionRecord *b)

Protected Member Functions

 CVersion ()

Static Protected Attributes

static CVersionm_instance = NULL


Detailed Description

A class for maintaining version records of all the source files which make up a binary.

This class is basically a means of storing a collection of CVersionRecord objects.

The intention is that each C++ class in a project will have a single CVersionRecord object associated with it - this class will be the single, global, store for these records.

This class is a singleton, which allows you to access the stored records, for display or other uses.

See also:
CVersionRecord
Author:
Steve Kemp http://www.steve.org.uk/
Version:
Revision
1.2


Constructor & Destructor Documentation

CVersion::~CVersion  )  [virtual]
 

Destructor.

CVersion::CVersion  )  [protected]
 

Protected constructor. (This is a singleton).


Member Function Documentation

void CVersion::AddFileVersion char *  file,
char *  date,
char *  version
 

Add a version record to this object.

Parameters:
file The filename that we're referring to.
date The date this file was compiled.
version The version ID of that file.

int CVersion::compareFunction CVersionRecord a,
CVersionRecord b
[static]
 

Compare two version records - this is static so that users may request a sort without any effort.

Parameters:
a The first version record to compare.
b The second version record to compare.
Returns:
1 if a < b, 0 otherwise.

CVersion * CVersion::GetInstance  )  [static]
 

This class is implemented as a singleton pattern, this method allows access to the single, global, version object.

Returns:
A pointer to this single version interface.

std::vector< CVersionRecord * > * CVersion::GetVersionRecords  ) 
 

Retrieve the current collection of version records.

Returns:
A vector containing the version records.


Member Data Documentation

CVersion * CVersion::m_instance = NULL [static, protected]
 

The single instance of this class.


The documentation for this class was generated from the following files:
Generated on Tue Oct 25 23:04:38 2005 for fortress by  doxygen 1.4.2