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);
This class defines the interface of abstract factories without initializing parameters.
This class is used to set the main functions of a cache policy.
This is the abstract factory for Graphs.
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.
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...
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.
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.
static int getId(const std::map< std::string, std::string > &gInfo)
This method is a auxiliar function used to get the graph id.
virtual void getCreationalParameters(std::vector< std::pair< std::string, std::string > > ¶ms) const =0
It returns the list of parameters accepted as graph info.
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 * 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.
static AbstractGraph * make()
It creates and returns an empty graph with default graph type.
AbstractGraphFactory(const std::string &factoryKey)
Constructor.
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)
It creates an empty graph with the proper type.
virtual ~AbstractGraphFactory()
Destructor.
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 void setMetadataInformation(const std::map< std::string, std::string > &gInfo, te::graph::GraphMetadata *metadata)
virtual const std::string & getType() const =0
Returns the type (name) of this factory.
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...
Abstract class used to define the main functions of graph struct. All graph implementations must used...
#define TEGRAPHEXPORT
You can use this macro in order to export/import classes and functions from this module.