Initializer Class Reference

This class will check and initialize the database. More...

#include <Initializer.h>

List of all members.

Public Member Functions

 Initializer (Database *db)
 Constructs an Initializer with the specified database connection.
 ~Initializer ()
 Destructor, a noop.
bool VerifyDatabaseVersion ()
 Whether the database version is the same as the version that was used to build this Initializer.
bool VerifyTables (TableImplVector::const_iterator begin, TableImplVector::const_iterator end)
 Whether the tables match.
void InitTables (TableImplVector::const_iterator begin, TableImplVector::const_iterator end)
 Create the tables in the database.
void InitDatabase ()
 Fill the tables with some default values.
void InitColours ()
 Fill the colour table.
void InitCommands ()
 Fill the command table.


Detailed Description

This class will check and initialize the database.

It will first check whether the database is already initialized. If it is not yet initialized it will create the appropriate tables. Therafter it will verify that the schema is good (regardless of earlier actions). When all is well it will initialize the Database with some default values. Also the Colours and Commands table will be filled.

Definition at line 41 of file Initializer.h.


Constructor & Destructor Documentation

Initializer::Initializer ( Database db  )  [inline, explicit]

Constructs an Initializer with the specified database connection.

Definition at line 45 of file Initializer.h.

Initializer::~Initializer (  )  [inline]

Destructor, a noop.

Definition at line 48 of file Initializer.h.


Member Function Documentation

bool Initializer::VerifyDatabaseVersion (  ) 

Whether the database version is the same as the version that was used to build this Initializer.

bool Initializer::VerifyTables ( TableImplVector::const_iterator  begin,
TableImplVector::const_iterator  end 
)

Whether the tables match.

void Initializer::InitTables ( TableImplVector::const_iterator  begin,
TableImplVector::const_iterator  end 
)

Create the tables in the database.

void Initializer::InitDatabase (  ) 

Fill the tables with some default values.

void Initializer::InitColours (  ) 

Fill the colour table.

void Initializer::InitCommands (  ) 

Fill the command table.


Generated for UnsignedByte by  doxygen 1.5.3
SourceForge.net Logo