openModeller  Version 1.4.0
TeDatabaseManager Class Reference

Manages TeDatabases connections. More...

#include <TeDatabaseManager.hh>

Collaboration diagram for TeDatabaseManager:

List of all members.

Public Member Functions

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

Static Public Member Functions

static TeDatabaseManagerinstance ()
 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.
TeDatabaseManageroperator= (const TeDatabaseManager &)
 No copy allowed.
 ~TeDatabaseManager ()
 No destruct allowed.

Private Attributes

MapManager mapManager_
 Map of TeDatabase and identifiers.

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 ( ) [inline, private]

No build allowed.

Singleton pattern doesn't allows a public constuctor.

Definition at line 75 of file TeDatabaseManager.hh.

No copy allowed.

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().

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

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: