#include <Initializer.h>
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. |
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.
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] |
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.