GlobalObjects
Loading...
Searching...
No Matches
glo::Manager::SchemaMapItem Class Reference

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 ()
 
SchemaInterfacegetSchema () const
 
TableWriterInterfacegetTableWriterInterface () const
 
void incrementCounter ()
 

Protected Member Functions

 SchemaMapItem ()
 

Private Member Functions

 SchemaMapItem (const SchemaMapItem &)
 
Manager::SchemaMapItemoperator= (const SchemaMapItem &)
 

Private Attributes

std::ofstream * m_pLockFile
 
SchemaInterfacem_pSchema
 
TableWriterInterfacem_pTableWriterInterface
 
unsigned int m_uiCounter
 

Detailed Description

Objects of this class represent an open database. There is one object of this class for each open database.

Author
Helmut Jakoby

Constructor & Destructor Documentation

◆ SchemaMapItem() [1/3]

glo::Manager::SchemaMapItem::SchemaMapItem ( )
protected

The standard constructor is not available.

◆ SchemaMapItem() [2/3]

glo::Manager::SchemaMapItem::SchemaMapItem ( SchemaInterface * pSchema,
RealIndexPool * pRealIndexPool,
std::ofstream * pLockFile )

Constructor with parameter passing.

Parameters
[in]pSchemaThe schema interface knows how objects and data sets are related.
[in]pRealIndexPoolThere is a real index of all persistent objects for the opened database.
[in]pLockFileTo 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.
Attention
The passed schema interface and the passed lock file become the property of this object, they must not be removed from memory by the parent instance, this instance takes care of this.

◆ ~SchemaMapItem()

glo::Manager::SchemaMapItem::~SchemaMapItem ( )

Destructor. Excludes the lock file from m_pLockFile and clears the memory.

◆ SchemaMapItem() [3/3]

glo::Manager::SchemaMapItem::SchemaMapItem ( const SchemaMapItem & )
private

The copy constructor is not available.

Member Function Documentation

◆ Counter()

unsigned int glo::Manager::SchemaMapItem::Counter ( ) const

Returns the reference counter.

Returns
The reference counter m_uiCounter.

◆ decrementCounter()

void glo::Manager::SchemaMapItem::decrementCounter ( )

Decrements the reference counter.

◆ getSchema()

SchemaInterface * glo::Manager::SchemaMapItem::getSchema ( ) const

Returns the schema interface.

Returns
The Schema Interface.
Attention
The calling instance must not remove the returned object from memory. It only lives as long as this object.

◆ getTableWriterInterface()

TableWriterInterface * glo::Manager::SchemaMapItem::getTableWriterInterface ( ) const

Returns the table writer.

Returns
The table writer.
Attention
The calling instance must not remove the returned object from memory. It only lives as long as this object.

◆ incrementCounter()

void glo::Manager::SchemaMapItem::incrementCounter ( )

Increments the reference counter.

◆ operator=()

Manager::SchemaMapItem & glo::Manager::SchemaMapItem::operator= ( const SchemaMapItem & )
private

The assignment operator is not available.

Member Data Documentation

◆ m_pLockFile

std::ofstream* glo::Manager::SchemaMapItem::m_pLockFile
private

A lock file with exclusive access is created. This is to prevent the database from being opened a second time.

◆ m_pSchema

SchemaInterface* glo::Manager::SchemaMapItem::m_pSchema
private

Das Schema.

◆ m_pTableWriterInterface

TableWriterInterface* glo::Manager::SchemaMapItem::m_pTableWriterInterface
private

The table writer for the open database.

◆ m_uiCounter

unsigned int glo::Manager::SchemaMapItem::m_uiCounter
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.


The documentation for this class was generated from the following file: