TeMetaModelCache Class Reference

#include <TeMetaModelCache.h>


Detailed Description

An instance of this class keeps track of meta objects stored in a TerraLib Database. This instance can be shared by all database connections.

See also:
TeTheme, TeView, TeLayer, TeAttribute

Definition at line 42 of file TeMetaModelCache.h.


Public Member Functions

void clear ()
 Clears metadata.
TeThemeMapinvalidThemeMap ()
 Returns the map of invalid themes in the database.
TeLayerMaplayerMap ()
 Returns the map of layers in the database.
TeLegendEntryMaplegendMap ()
 Returns the map of legends in the database.
map< int, map
< string, string > > & 
mapThemeAlias ()
TeProjectMapprojectMap ()
 Returns the map of projects in the database.
multiset< int > & relationMSet ()
 Returns the set of relations between tables.
 TeMetaModelCache ()
 Empty constructor.
TeThemeMapthemeMap ()
 Returns the map of themes in the database.
TeViewMapviewMap ()
 Returns the map of views in the database.
 ~TeMetaModelCache ()
 Destructor.

Private Member Functions

TeMetaModelCacheoperator= (const TeMetaModelCache &rhs)
 Assignment operator not allowed.
 TeMetaModelCache (const TeMetaModelCache &rhs)
 Copy constructor not allowed.

Private Attributes

TeThemeMap invalidThemeMap_
 invalid theme map
TeLayerMap layerMap_
 layer map
TeLegendEntryMap legendMap_
 view map
map< int, map
< string, string > > 
mapThemeAlias_
 An associative container from theme identifier (int) to legend alias (map<string, string>). The theme alias is another container, where key is a string with a column name used in a group that maps to a legend alias (string value).
TeProjectMap projectMap_
 project map
multiset< int > relationMSet_
 multiset of relations between tables
TeThemeMap themeMap_
 theme map
TeViewMap viewMap_
 view map

Constructor & Destructor Documentation

TeMetaModelCache::TeMetaModelCache (  )  [inline]

Definition at line 48 of file TeMetaModelCache.h.

00049                 {}

TeMetaModelCache::~TeMetaModelCache (  )  [inline]

Definition at line 52 of file TeMetaModelCache.h.

00053                 { clear(); }

TeMetaModelCache::TeMetaModelCache ( const TeMetaModelCache rhs  )  [private]


Member Function Documentation

void TeMetaModelCache::clear ( void   ) 

Definition at line 3 of file TeMetaModelCache.cpp.

References invalidThemeMap_, layerMap_, legendMap_, projectMap_, themeMap_, and viewMap_.

00004 {
00005         TeViewMap::iterator viewIt;
00006         for (viewIt = viewMap_.begin(); viewIt != viewMap_.end(); ++viewIt)
00007         {
00008                 if(viewIt->second)
00009                         delete viewIt->second;
00010         }
00011 
00012         TeLayerMap::iterator layerIt;
00013         for (layerIt = layerMap_.begin(); layerIt != layerMap_.end(); ++layerIt)
00014         {
00015                 if (layerIt->second)
00016                         delete layerIt->second;
00017         }
00018 
00019         TeProjectMap::iterator projectIt;
00020         for (projectIt = projectMap_.begin(); projectIt != projectMap_.end(); ++projectIt)
00021         {
00022                 if (projectIt->second)
00023                         delete projectIt->second;
00024         }
00025 
00026         TeThemeMap::iterator invThemeIt;
00027         for (invThemeIt = invalidThemeMap_.begin(); invThemeIt != invalidThemeMap_.end(); ++invThemeIt)
00028         {
00029                 if (invThemeIt->second)
00030                         delete invThemeIt->second;
00031         }
00032 
00033         legendMap_.clear();
00034         themeMap_.clear();
00035         invalidThemeMap_.clear();
00036         viewMap_.clear();
00037         layerMap_.clear();
00038         projectMap_.clear();
00039 }

TeThemeMap& TeMetaModelCache::invalidThemeMap (  )  [inline]

Definition at line 71 of file TeMetaModelCache.h.

00072                 { return invalidThemeMap_; }

TeLayerMap& TeMetaModelCache::layerMap (  )  [inline]

Definition at line 59 of file TeMetaModelCache.h.

00060                 { return layerMap_; }

TeLegendEntryMap& TeMetaModelCache::legendMap (  )  [inline]

Definition at line 79 of file TeMetaModelCache.h.

00080                 { return legendMap_; }

map<int, map<string, string> >& TeMetaModelCache::mapThemeAlias (  )  [inline]

Definition at line 86 of file TeMetaModelCache.h.

00087                 {return mapThemeAlias_;}

TeMetaModelCache& TeMetaModelCache::operator= ( const TeMetaModelCache rhs  )  [private]

TeProjectMap& TeMetaModelCache::projectMap (  )  [inline]

Definition at line 75 of file TeMetaModelCache.h.

00076                 { return projectMap_; }

multiset<int>& TeMetaModelCache::relationMSet (  )  [inline]

Definition at line 83 of file TeMetaModelCache.h.

00084                 { return relationMSet_; }

TeThemeMap& TeMetaModelCache::themeMap (  )  [inline]

Definition at line 67 of file TeMetaModelCache.h.

00068                 { return themeMap_; }

TeViewMap& TeMetaModelCache::viewMap (  )  [inline]

Definition at line 63 of file TeMetaModelCache.h.

00064                 { return viewMap_; }


Field Documentation

TeThemeMap TeMetaModelCache::invalidThemeMap_ [private]

Definition at line 102 of file TeMetaModelCache.h.

Referenced by clear().

TeLayerMap TeMetaModelCache::layerMap_ [private]

Definition at line 99 of file TeMetaModelCache.h.

Referenced by clear().

TeLegendEntryMap TeMetaModelCache::legendMap_ [private]

Definition at line 103 of file TeMetaModelCache.h.

Referenced by clear().

map<int, map<string, string> > TeMetaModelCache::mapThemeAlias_ [private]

Definition at line 111 of file TeMetaModelCache.h.

TeProjectMap TeMetaModelCache::projectMap_ [private]

Definition at line 104 of file TeMetaModelCache.h.

Referenced by clear().

multiset<int> TeMetaModelCache::relationMSet_ [private]

Definition at line 105 of file TeMetaModelCache.h.

TeThemeMap TeMetaModelCache::themeMap_ [private]

Definition at line 101 of file TeMetaModelCache.h.

Referenced by clear().

TeViewMap TeMetaModelCache::viewMap_ [private]

Definition at line 100 of file TeMetaModelCache.h.

Referenced by clear().


The documentation for this class was generated from the following files:
Generated on Sun Jul 29 04:06:47 2012 for TerraLib - Development Source by  doxygen 1.5.3