openModeller
Version 1.4.0
|
Manages TeDatabases connections. More...
#include <TeDatabaseManager.hh>
Public Member Functions | |
TeDatabase * | create (const TeDatabaseFactoryParams ¶ms) |
Return a TeDatabase pointer if it exists or create a new one. | |
Static Public Member Functions | |
static TeDatabaseManager & | instance () |
Singleton pattern. | |
Private Types | |
typedef map< string, TeDatabase * > | MapManager |
Map of TeDatabase and identifiers. | |
Private Member Functions | |
TeDatabaseManager () | |
No build allowed. | |
TeDatabaseManager (const TeDatabaseManager &) | |
No copy allowed. | |
TeDatabaseManager & | operator= (const TeDatabaseManager &) |
No copy allowed. | |
~TeDatabaseManager () | |
No destruct allowed. | |
Private Attributes | |
MapManager | mapManager_ |
Map of TeDatabase and identifiers. |
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.
typedef map<string, TeDatabase*> TeDatabaseManager::MapManager [private] |
Map of TeDatabase and identifiers.
Definition at line 51 of file TeDatabaseManager.hh.
TeDatabaseManager::TeDatabaseManager | ( | ) | [inline, private] |
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.
TeDatabase * TeDatabaseManager::create | ( | const TeDatabaseFactoryParams & | params | ) |
Return a TeDatabase pointer if it exists or create a new one.
params | TeDatabaseFactoryParams. 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.
MapManager TeDatabaseManager::mapManager_ [private] |
Map of TeDatabase and identifiers.
Definition at line 69 of file TeDatabaseManager.hh.
Referenced by create().