Go to the documentation of this file.
26 #ifndef __TERRALIB_GRAPH_INTERNAL_ABSTRACTGRAPHFACTORY_H
27 #define __TERRALIB_GRAPH_INTERNAL_ABSTRACTGRAPHFACTORY_H
30 #include "../../common/AbstractFactory.h"
31 #include "../graphs/Graph.h"
32 #include "../Config.h"
40 class AbstractCachePolicy;
42 class AbstractGraphLoaderStrategy;
86 static AbstractGraph*
make(
const std::string& dsInfo,
const std::map<std::string, std::string>& gInfo);
100 static AbstractGraph*
make(
const std::string& gType,
const std::string& dsInfo,
const std::map<std::string, std::string>& gInfo);
112 static AbstractGraph*
open(
const std::string& dsInfo,
const std::map<std::string, std::string>& gInfo);
125 static AbstractGraph*
open(
const std::string& gType,
const std::string& dsInfo,
const std::map<std::string, std::string>& gInfo);
132 virtual const std::string&
getType()
const = 0;
156 virtual AbstractGraph*
iOpen(
const std::string& dsInfo,
const std::map<std::string, std::string>& gInfo) = 0;
168 virtual AbstractGraph*
create(
const std::string& dsInfo,
const std::map<std::string, std::string>& gInfo) = 0;
190 static int getId(
const std::map<std::string, std::string>& gInfo);
221 #endif // __TERRALIB_GRAPH_INTERNAL_ABSTRACTGRAPHFACTORY_H
static int getId(const std::map< std::string, std::string > &gInfo)
This method is a auxiliar function used to get the graph id.
static AbstractGraph * make()
It creates and returns an empty graph with default graph type.
This class defines the interface of abstract factories without initializing parameters.
static te::graph::AbstractGraphLoaderStrategy * getLoaderStrategy(const std::map< std::string, std::string > &gInfo, te::graph::GraphMetadata *metadata)
This method is a auxiliar function used to get the loader strategy pointer.
static AbstractGraph * make(const std::string &gType, const std::string &dsInfo, const std::map< std::string, std::string > &gInfo)
It creates a graph with the given parameters using the default graph type.
static AbstractGraph * open(const std::string &dsInfo, const std::map< std::string, std::string > &gInfo)
It opens a graph with the given parameters and default graph type.
static te::graph::AbstractCachePolicy * getCachePolicy(const std::map< std::string, std::string > &gInfo)
This method is a auxiliar function used to get the cache policy pointer.
virtual ~AbstractGraphFactory()
Destructor.
virtual AbstractGraph * iOpen(const std::string &dsInfo, const std::map< std::string, std::string > &gInfo)=0
This method must be re-implemented by subclasses in order to have a finner control for the graph obje...
virtual const std::string & getType() const =0
Returns the type (name) of this factory.
#define TEGRAPHEXPORT
You can use this macro in order to export/import classes and functions from this module.
static AbstractGraph * make(const std::string &dsInfo, const std::map< std::string, std::string > &gInfo)
It creates a graph with the given parameters using the default graph type.
virtual AbstractGraph * create(const std::string &dsInfo, const std::map< std::string, std::string > &gInfo)=0
This method must be implemented by subclasses (graph types).
static AbstractGraph * open(const std::string &gType, const std::string &dsInfo, const std::map< std::string, std::string > &gInfo)
It creates a graph with the given parameters.
AbstractGraphFactory(const std::string &factoryKey)
Constructor.
virtual void getCreationalParameters(std::vector< std::pair< std::string, std::string > > ¶ms) const =0
It returns the list of parameters accepted as graph info.
This is the abstract factory for Graphs.
Abstract class used to define the main functions of graph struct. All graph implementations must used...
static AbstractGraph * make(const std::string &gType)
It creates an empty graph with the proper type.
static te::graph::GraphMetadata * getMetadata(const std::string &dsInfo, const std::map< std::string, std::string > &gInfo)
This method is a auxiliar function used to get the metadata pointer.
This class define the main functions necessary to save and load the graph data and metadata informati...
static void setMetadataInformation(const std::map< std::string, std::string > &gInfo, te::graph::GraphMetadata *metadata)
This class is used to set the main functions of a cache policy.