#include <version.h>
Public Member Functions | |
InstallVersion (char *file, char *date, char *version) |
Usage is extremely simple, in each C++ file include the following two lines, near the top:
#include "version.h" InstallVersion dummy( __ FILE __, __ DATE __, "$Revision: 1.2 $" );
This will install the current file into the versioning system, which you may then query, like this:
printf( "\nSource Versions:\n" ); std::vector< CVersionRecord *> *versions; versions = CVersion::GetInstance()->GetVersionRecords(); std::vector< CVersionRecord *>::iterator i; for( i = versions->begin(); i != versions->end(); i++ ) { CVersionRecord *v = *i; printf("\t%s \t %s\n", v->GetVersion(), v->GetFile() ); }
|
Constructor. The sole purpose of this class, and its constructor is to provide a simple means of instantiating an instance of the CVersion class - then adding information about the current file to it. This makes manual addition needless, and makes this versioning system simple to use.
|