GlobalObjects
|
Objects of this class represent an open database. There is one object of this class for each open database. More...
#include <GloManager.h>
Public Member Functions | |
SchemaMapItem (SchemaInterface *pSchema, RealIndexPool *pRealIndexPool, std::ofstream *pLockFile) | |
~SchemaMapItem () | |
unsigned int | Counter () const |
void | decrementCounter () |
SchemaInterface * | getSchema () const |
TableWriterInterface * | getTableWriterInterface () const |
void | incrementCounter () |
Protected Member Functions | |
SchemaMapItem () | |
Private Member Functions | |
SchemaMapItem (const SchemaMapItem &) | |
Manager::SchemaMapItem & | operator= (const SchemaMapItem &) |
Private Attributes | |
std::ofstream * | m_pLockFile |
SchemaInterface * | m_pSchema |
TableWriterInterface * | m_pTableWriterInterface |
unsigned int | m_uiCounter |
Objects of this class represent an open database. There is one object of this class for each open database.
|
protected |
The standard constructor is not available.
glo::Manager::SchemaMapItem::SchemaMapItem | ( | SchemaInterface * | pSchema, |
RealIndexPool * | pRealIndexPool, | ||
std::ofstream * | pLockFile ) |
Constructor with parameter passing.
[in] | pSchema | The schema interface knows how objects and data sets are related. |
[in] | pRealIndexPool | There is a real index of all persistent objects for the opened database. |
[in] | pLockFile | To open the database only once, a lock file with exclusive access is created and passed here. A second opening of the database should thus be prevented. |
glo::Manager::SchemaMapItem::~SchemaMapItem | ( | ) |
Destructor. Excludes the lock file from m_pLockFile and clears the memory.
|
private |
The copy constructor is not available.
unsigned int glo::Manager::SchemaMapItem::Counter | ( | ) | const |
Returns the reference counter.
void glo::Manager::SchemaMapItem::decrementCounter | ( | ) |
Decrements the reference counter.
SchemaInterface * glo::Manager::SchemaMapItem::getSchema | ( | ) | const |
Returns the schema interface.
TableWriterInterface * glo::Manager::SchemaMapItem::getTableWriterInterface | ( | ) | const |
Returns the table writer.
void glo::Manager::SchemaMapItem::incrementCounter | ( | ) |
Increments the reference counter.
|
private |
The assignment operator is not available.
|
private |
A lock file with exclusive access is created. This is to prevent the database from being opened a second time.
|
private |
Das Schema.
|
private |
The table writer for the open database.
|
private |
A reference counter to prevent multiple opening of a database. Only when the database is closed for the last time is the database realy closed by the reference counter == 0.