This singleton defines the TerraLib metadata record manager entry. More...
#include <MetadataManager.h>
Public Member Functions | |
MetadataManager Accessor Method | |
Method used to access the data stored on this manager. | |
void | insert (MetadataAnnotation *a) |
Inserts a new metadata annotation to the manager. More... | |
void | erase (MetadataAnnotation *a) |
Removes the annotation from the manager and frees its resources. More... | |
const MetadataAnnotation * | find (const std::string &aid) const |
Searches for an annotation, given its identification. More... | |
const std::map< std::string, MetadataAnnotation * > & | getAnnotations () const |
Gives access to the set of metadata annotations. More... | |
bool | isEmpty () const |
Check wheter the manager is empty. More... | |
void | clear () |
Removes all the annotation from the manager. More... | |
const std::map< std::string, MetadataAnnotation * >::const_iterator | getBeginIterator () const |
Returns a begin iterator to the annotations managed. More... | |
const std::map< std::string, MetadataAnnotation * >::const_iterator | getEndIterator () const |
Returns an end iterator pointing to the annotations managed. More... | |
Static Public Member Functions | |
static MetadataManager & | getInstance () |
It returns a reference to the singleton instance. More... | |
Private Attributes | |
std::map< std::string, MetadataAnnotation * > | m_metadata |
Friends | |
class | te::common::Singleton< MetadataManager > |
Initializer Methods | |
~MetadataManager () | |
Destructor. More... | |
MetadataManager () | |
It initializes the Singleton. More... | |
This singleton defines the TerraLib metadata record manager entry.
Definition at line 49 of file MetadataManager.h.
te::md::MetadataManager::~MetadataManager | ( | ) |
Destructor.
Definition at line 37 of file MetadataManager.cpp.
|
protected |
It initializes the Singleton.
Definition at line 35 of file MetadataManager.cpp.
void te::md::MetadataManager::clear | ( | ) |
Removes all the annotation from the manager.
Definition at line 95 of file MetadataManager.cpp.
void te::md::MetadataManager::erase | ( | MetadataAnnotation * | a | ) |
Removes the annotation from the manager and frees its resources.
a | Pointer to the annnotation to be removed. This pointer will be freed and invalidated. |
te::md::Exception | If the annotation doesn't exist. |
Definition at line 55 of file MetadataManager.cpp.
References te::md::MetadataAnnotation::getAnnotationtId(), and TE_TR.
const te::md::MetadataAnnotation * te::md::MetadataManager::find | ( | const std::string & | aid | ) | const |
Searches for an annotation, given its identification.
aid | The name annotation identification. |
Definition at line 69 of file MetadataManager.cpp.
const std::map< std::string, te::md::MetadataAnnotation * > & te::md::MetadataManager::getAnnotations | ( | ) | const |
Gives access to the set of metadata annotations.
Definition at line 82 of file MetadataManager.cpp.
const std::map< std::string, te::md::MetadataAnnotation * >::const_iterator te::md::MetadataManager::getBeginIterator | ( | ) | const |
Returns a begin iterator to the annotations managed.
Definition at line 101 of file MetadataManager.cpp.
const std::map< std::string, te::md::MetadataAnnotation * >::const_iterator te::md::MetadataManager::getEndIterator | ( | ) | const |
Returns an end iterator pointing to the annotations managed.
Definition at line 107 of file MetadataManager.cpp.
|
staticinherited |
It returns a reference to the singleton instance.
void te::md::MetadataManager::insert | ( | MetadataAnnotation * | a | ) |
Inserts a new metadata annotation to the manager.
a | Pointer to the new metadata annotation. Class takes pointer ownership. Do not pass null. |
te::md::Exception | If the annotation is already managed. |
Definition at line 42 of file MetadataManager.cpp.
References te::md::MetadataAnnotation::getAnnotationtId(), and TE_TR.
bool te::md::MetadataManager::isEmpty | ( | ) | const |
Check wheter the manager is empty.
Definition at line 89 of file MetadataManager.cpp.
|
friend |
Definition at line 51 of file MetadataManager.h.
|
private |
Definition at line 133 of file MetadataManager.h.