te::md::MetadataManager Class Reference

This singleton defines the TerraLib metadata record manager entry. More...

#include <MetadataManager.h>

Inheritance diagram for te::md::MetadataManager:
te::common::Singleton< MetadataManager >

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 MetadataAnnotationfind (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 MetadataManagergetInstance ()
 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

Methods related to instantiation and destruction.

 ~MetadataManager ()
 Destructor. More...
 
 MetadataManager ()
 It initializes the Singleton. More...
 

Detailed Description

This singleton defines the TerraLib metadata record manager entry.

Definition at line 49 of file MetadataManager.h.

Constructor & Destructor Documentation

te::md::MetadataManager::~MetadataManager ( )

Destructor.

te::md::MetadataManager::MetadataManager ( )
protected

It initializes the Singleton.

Member Function Documentation

void te::md::MetadataManager::clear ( )

Removes all the annotation from the manager.

void te::md::MetadataManager::erase ( MetadataAnnotation a)

Removes the annotation from the manager and frees its resources.

Parameters
aPointer to the annnotation to be removed. This pointer will be freed and invalidated.
Exceptions
te::md::ExceptionIf the annotation doesn't exist.
const MetadataAnnotation* te::md::MetadataManager::find ( const std::string &  aid) const

Searches for an annotation, given its identification.

Parameters
aidThe name annotation identification.
Returns
A pointer to the annotation if found or NULL otherwise. Class maintains the ownership of returned pointer.
const std::map<std::string,MetadataAnnotation*>& te::md::MetadataManager::getAnnotations ( ) const

Gives access to the set of metadata annotations.

Returns
A const reference to the set of annotation indexed by it's id.
const std::map<std::string,MetadataAnnotation*>::const_iterator te::md::MetadataManager::getBeginIterator ( ) const

Returns a begin iterator to the annotations managed.

const std::map<std::string,MetadataAnnotation*>::const_iterator te::md::MetadataManager::getEndIterator ( ) const

Returns an end iterator pointing to the annotations managed.

static MetadataManager & te::common::Singleton< MetadataManager >::getInstance ( )
staticinherited

It returns a reference to the singleton instance.

Returns
A reference to the singleton instance.
void te::md::MetadataManager::insert ( MetadataAnnotation a)

Inserts a new metadata annotation to the manager.

Parameters
aPointer to the new metadata annotation. Class takes pointer ownership. Do not pass null.
Exceptions
te::md::ExceptionIf the annotation is already managed.
bool te::md::MetadataManager::isEmpty ( ) const

Check wheter the manager is empty.

Returns
True if there is no annotation in the manager and false otherwise.

Friends And Related Function Documentation

friend class te::common::Singleton< MetadataManager >
friend

Definition at line 51 of file MetadataManager.h.

Member Data Documentation

std::map<std::string,MetadataAnnotation*> te::md::MetadataManager::m_metadata
private

Definition at line 133 of file MetadataManager.h.


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