openModeller  Version 1.5.0
TeDatabaseManager Class Reference

Manages TeDatabases connections. More...

#include <TeDatabaseManager.hh>

Collaboration diagram for TeDatabaseManager:
Collaboration graph

Public Member Functions

TeDatabase * create (const TeDatabaseFactoryParams &params)
 Return a TeDatabase pointer if it exists or create a new one. More...
 

Static Public Member Functions

static TeDatabaseManagerinstance ()
 Singleton pattern. More...
 

Private Types

typedef map< string, TeDatabase * > MapManager
 Map of TeDatabase and identifiers. More...
 

Private Member Functions

 TeDatabaseManager ()
 No build allowed. More...
 
 TeDatabaseManager (const TeDatabaseManager &)
 No copy allowed. More...
 
TeDatabaseManageroperator= (const TeDatabaseManager &)
 No copy allowed. More...
 
 ~TeDatabaseManager ()
 No destruct allowed. More...
 

Private Attributes

MapManager mapManager_
 Map of TeDatabase and identifiers. More...
 

Detailed Description

Manages TeDatabases connections.

Verify if exists one connection to a specified TeDatabaseFactoryParams and return it or a new connection. Obs: Don't delete the TeDatabase pointer or close the connection.

Definition at line 47 of file TeDatabaseManager.hh.

Member Typedef Documentation

typedef map<string, TeDatabase*> TeDatabaseManager::MapManager
private

Map of TeDatabase and identifiers.

Definition at line 51 of file TeDatabaseManager.hh.

Constructor & Destructor Documentation

TeDatabaseManager::TeDatabaseManager ( )
inlineprivate

No build allowed.

Singleton pattern doesn't allows a public constuctor.

Definition at line 75 of file TeDatabaseManager.hh.

TeDatabaseManager::TeDatabaseManager ( const TeDatabaseManager )
private

No copy allowed.

TeDatabaseManager::~TeDatabaseManager ( )
private

No destruct allowed.

Descturctor.

Delete all opened databases.

Definition at line 73 of file TeDatabaseManager.cpp.

Member Function Documentation

TeDatabase * TeDatabaseManager::create ( const TeDatabaseFactoryParams &  params)

Return a TeDatabase pointer if it exists or create a new one.

Parameters
paramsTeDatabaseFactoryParams. Obs: The TeDatabase is already connected.

Definition at line 49 of file TeDatabaseManager.cpp.

References mapManager_.

Referenced by TerralibRaster::createTeRaster(), TerralibRaster::deleteRaster(), TeOccurrences::load(), and TerralibRaster::openTeRaster().

TeDatabaseManager & TeDatabaseManager::instance ( )
static

Singleton pattern.

Returns the unique instance of TeDatabaseManager.

Singleton pattern

Definition at line 37 of file TeDatabaseManager.cpp.

Referenced by TerralibRaster::createTeRaster(), TerralibRaster::deleteRaster(), TeOccurrences::load(), and TerralibRaster::openTeRaster().

TeDatabaseManager& TeDatabaseManager::operator= ( const TeDatabaseManager )
private

No copy allowed.

Member Data Documentation

MapManager TeDatabaseManager::mapManager_
private

Map of TeDatabase and identifiers.

Definition at line 69 of file TeDatabaseManager.hh.

Referenced by create().


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