29 #ifndef __TERRALIB_GRAPH_INTERNAL_GRAPHCACHE_H
30 #define __TERRALIB_GRAPH_INTERNAL_GRAPHCACHE_H
33 #include "../Config.h"
43 class AbstractCachePolicy;
44 class AbstractGraphLoaderStrategy;
46 class GraphDataManager;
This class is used to set the main functions of a cache policy.
Class used to manager the graph data elements. This class uses a cache policy to control the elements...
GraphDataManager * m_dataManager
Used to load and save GraphData information from a DataSource.
GraphData * getGraphData()
Get a graph data.
void clearCache()
Used to remove from memory all elements loaded.
GraphData * checkCacheByEdgeId(int id)
This functions check in cache if the edge element with a given id was alredy in memory.
std::map< int, GraphData * > m_graphDataMap
This map represents all data loaded in cache.
GraphMetadata * m_metadata
Graph metadata information.
GraphData * checkCacheByVertexId(int id)
This functions check in cache if the vertex element with a given id was alredy in memory.
int m_graphDataCounter
Graph data identifier counter.
GraphData * getGraphDataByEdgeId(int id)
Get a graph data from vector using a edge id information. if not found a new graph data has to be loa...
void saveGraphData(GraphData *data)
Save the graph data structure inside a data source.
void removeGraphData(int idx)
Used to remove a graph data from cache.
AbstractCachePolicy * m_policy
Cache policy to control the cache in memory.
GraphCache(AbstractCachePolicy *cp, GraphDataManager *dm)
Default constructor.
~GraphCache()
Default destructor.
int getGraphDataId()
Protected function used to define a new value of Id to a graph data.
GraphData * getGraphDataByVertexId(int id)
Get a graph data from vector using a vertex id information. if not found a new graph data has to be l...
GraphData * createGraphData()
Creates a new graph data structure.
This class define a important struct used to group a map of vertex and edges. A flag is used to indic...
#define TEGRAPHEXPORT
You can use this macro in order to export/import classes and functions from this module.