This is the abstract factory for Graphs. More...
#include <AbstractGraphFactory.h>
Public Types | |
typedef FactoryDictionary < AbstractFactory < AbstractGraph, std::string, std::less< std::string > >, std::string, std::less < std::string > > | dictionary_type |
typedef AbstractFactory | factory_type |
Public Member Functions | |
virtual void | getCreationalParameters (std::vector< std::pair< std::string, std::string > > ¶ms) const =0 |
It returns the list of parameters accepted as graph info. More... | |
const std::string & | getKey () const |
It returns the factory key associated to the concreate factory. More... | |
virtual const std::string & | getType () const =0 |
Returns the type (name) of this factory. More... | |
virtual | ~AbstractGraphFactory () |
Destructor. More... | |
Static Public Member Functions | |
static const factory_type * | find (const std::string &factoryKey) |
static dictionary_type & | getDictionary () |
It returns a reference to the internal dictionary of concrete factories. More... | |
static AbstractGraph * | make () |
It creates and returns an empty graph with default graph type. More... | |
static AbstractGraph * | make (const std::string &gType) |
It creates an empty graph with the proper type. More... | |
static AbstractGraph * | make (const std::map< std::string, std::string > &dsInfo, const std::map< std::string, std::string > &gInfo) |
It creates a graph with the given parameters using the default graph type. More... | |
static AbstractGraph * | make (const std::string &gType, const std::map< std::string, std::string > &dsInfo, const std::map< std::string, std::string > &gInfo) |
It creates a graph with the given parameters using the default graph type. More... | |
static AbstractGraph * | open (const std::map< std::string, std::string > &dsInfo, const std::map< std::string, std::string > &gInfo) |
It opens a graph with the given parameters and default graph type. More... | |
static AbstractGraph * | open (const std::string &gType, const std::map< std::string, std::string > &dsInfo, const std::map< std::string, std::string > &gInfo) |
It creates a graph with the given parameters. More... | |
Protected Member Functions | |
AbstractGraphFactory (const std::string &factoryKey) | |
Constructor. More... | |
virtual AbstractGraph * | build ()=0 |
Concrete factories (derived from this one) must implement this method in order to create objects. More... | |
virtual AbstractGraph * | create (const std::map< std::string, std::string > &dsInfo, const std::map< std::string, std::string > &gInfo)=0 |
This method must be implemented by subclasses (graph types). More... | |
virtual AbstractGraph * | iOpen (const std::map< std::string, 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 object instantiation. More... | |
Protected Attributes | |
std::string | m_factoryKey |
The key that identifies the concrete factory: it will be used for unregistering the factory during destruction. More... | |
This is the abstract factory for Graphs.
Definition at line 49 of file AbstractGraphFactory.h.
|
inherited |
Definition at line 73 of file AbstractFactory.h.
|
inherited |
Definition at line 77 of file AbstractFactory.h.
|
inlinevirtual |
Destructor.
Definition at line 127 of file AbstractGraphFactory.h.
|
protected |
Constructor.
factoryKey | The key that identifies the factory. |
Definition at line 95 of file AbstractGraphFactory.cpp.
|
protectedpure virtualinherited |
Concrete factories (derived from this one) must implement this method in order to create objects.
Implemented in te::graph::BidirectionalGraphFactory, te::graph::DirectedGraphFactory, te::graph::GraphFactory, and te::graph::UndirectedGraphFactory.
|
protectedpure virtual |
This method must be implemented by subclasses (graph types).
dsInfo | The necessary information to access the data source. |
gInfo | The necessary information to create the graph. |
Implemented in te::graph::BidirectionalGraphFactory, te::graph::DirectedGraphFactory, te::graph::GraphFactory, and te::graph::UndirectedGraphFactory.
Referenced by make().
|
staticinherited |
|
pure virtual |
It returns the list of parameters accepted as graph info.
Implemented in te::graph::BidirectionalGraphFactory, te::graph::DirectedGraphFactory, te::graph::GraphFactory, and te::graph::UndirectedGraphFactory.
|
staticinherited |
It returns a reference to the internal dictionary of concrete factories.
The dictionary is a singleton.
|
inherited |
It returns the factory key associated to the concreate factory.
|
pure virtual |
Returns the type (name) of this factory.
Implemented in te::graph::BidirectionalGraphFactory, te::graph::DirectedGraphFactory, te::graph::GraphFactory, and te::graph::UndirectedGraphFactory.
|
protectedpure virtual |
This method must be re-implemented by subclasses in order to have a finner control for the graph object instantiation.
dsInfo | The necessary information to access the data source. |
gInfo | The necessary information to create the graph. |
Implemented in te::graph::BidirectionalGraphFactory, te::graph::DirectedGraphFactory, te::graph::GraphFactory, and te::graph::UndirectedGraphFactory.
Referenced by open().
|
static |
It creates and returns an empty graph with default graph type.
Definition at line 37 of file AbstractGraphFactory.cpp.
References te::common::AbstractFactory< TPRODUCT, TFACTORYKEY, TKEYCOMPARE >::make(), and TE_DEFAULT_GRAPH_TYPE.
Referenced by te::graph::QueryGraphBuilder::build(), te::graph::RAGGraphBuilder::build(), te::graph::LDDGraphBuilder::build(), and te::graph::FlowGraphBuilder::build().
|
static |
It creates an empty graph with the proper type.
gType | The name of the specific graph type to be used to create the graph. |
Definition at line 42 of file AbstractGraphFactory.cpp.
References te::common::Convert2UCase(), and te::common::AbstractFactory< TPRODUCT, TFACTORYKEY, TKEYCOMPARE >::make().
|
static |
It creates a graph with the given parameters using the default graph type.
dsInfo | The necessary information to access the data source. |
gInfo | The necessary information to create the graph. |
Definition at line 49 of file AbstractGraphFactory.cpp.
References TE_DEFAULT_GRAPH_TYPE.
|
static |
It creates a graph with the given parameters using the default graph type.
gType | The name of the specific driver to create the raster. |
dsInfo | The necessary information to access the data source. |
gInfo | The necessary information to create the graph. |
Definition at line 54 of file AbstractGraphFactory.cpp.
References te::common::Convert2UCase(), create(), te::common::FactoryDictionary< TFACTORY, TFACTORYKEY, TKEYCOMPARE >::find(), te::common::AbstractFactory< TPRODUCT, TFACTORYKEY, TKEYCOMPARE >::getDictionary(), te::graph::AbstractGraph::getMetadata(), te::graph::GraphMetadata::setType(), and TR_GRAPH.
|
static |
It opens a graph with the given parameters and default graph type.
dsInfo | The necessary information to access the data source. |
gInfo | The necessary information to create the graph. |
Definition at line 72 of file AbstractGraphFactory.cpp.
References TE_DEFAULT_GRAPH_TYPE.
|
static |
It creates a graph with the given parameters.
gType | The name of the specific graph type to create the graph. |
dsInfo | The necessary information to access the data source. |
gInfo | The necessary information to create the graph. |
Definition at line 77 of file AbstractGraphFactory.cpp.
References te::common::Convert2UCase(), te::common::FactoryDictionary< TFACTORY, TFACTORYKEY, TKEYCOMPARE >::find(), te::common::AbstractFactory< TPRODUCT, TFACTORYKEY, TKEYCOMPARE >::getDictionary(), te::graph::AbstractGraph::getMetadata(), iOpen(), te::graph::GraphMetadata::setType(), and TR_GRAPH.
|
protectedinherited |
The key that identifies the concrete factory: it will be used for unregistering the factory during destruction.
Definition at line 136 of file AbstractFactory.h.