This is the concrete factory for the commung Graph type. More...
#include <GraphFactory.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 | |
void | getCreationalParameters (std::vector< std::pair< std::string, std::string > > ¶ms) const |
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... | |
const std::string & | getType () const |
Returns the type (name) of this factory. More... | |
~GraphFactory () | |
Destructor. More... | |
Static Public Member Functions | |
static void | finalize () |
It finalizes the factory: the singleton instance will be destroyed and will be unregistered from the abstract factory ... More... | |
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 void | initialize () |
It initializes the factory: the singleton instance will be registered in the abstract factory ... 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 | |
te::graph::AbstractGraph * | build () |
Builder Function used to create the class object. More... | |
te::graph::AbstractGraph * | create (const std::map< std::string, std::string > &dsInfo, const std::map< std::string, std::string > &gInfo) |
This method must be implemented by subclasses (graph types). More... | |
GraphFactory () | |
Constructor. More... | |
te::graph::AbstractGraph * | iOpen (const std::map< std::string, std::string > &dsInfo, const std::map< std::string, std::string > &gInfo) |
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... | |
Static Private Attributes | |
static GraphFactory * | sm_factory |
Static instance used to register the factory. More... | |
This is the concrete factory for the commung Graph type.
Definition at line 44 of file GraphFactory.h.
|
inherited |
Definition at line 73 of file AbstractFactory.h.
|
inherited |
Definition at line 77 of file AbstractFactory.h.
|
inline |
Destructor.
Definition at line 49 of file GraphFactory.h.
|
protected |
Constructor.
Definition at line 70 of file GraphFactory.cpp.
|
protectedvirtual |
Builder Function used to create the class object.
Implements te::common::AbstractFactory< AbstractGraph, std::string >.
Definition at line 222 of file GraphFactory.cpp.
|
protectedvirtual |
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. |
Implements te::graph::AbstractGraphFactory.
Definition at line 141 of file GraphFactory.cpp.
References te::graph::Edge_List, te::graph::AbstractGraphLoaderStrategyFactory::make(), te::graph::AbstractCachePolicyFactory::make(), te::da::DataSourceFactory::make(), te::graph::DatabaseGraphMetadata::save(), te::graph::GraphMetadata::setDescription(), te::graph::GraphMetadata::setName(), te::graph::GraphMetadata::setStorageMode(), TE_GRAPH_STORAGE_MODE_BY_EDGE, TE_GRAPH_STORAGE_MODE_BY_VERTEX, TR_GRAPH, and te::graph::Vertex_List.
|
static |
It finalizes the factory: the singleton instance will be destroyed and will be unregistered from the abstract factory ...
Definition at line 64 of file GraphFactory.cpp.
Referenced by te::graph::Module::finalize().
|
staticinherited |
|
virtual |
It returns the list of parameters accepted as graph info.
Implements te::graph::AbstractGraphFactory.
Definition at line 47 of file GraphFactory.cpp.
|
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.
|
virtual |
Returns the type (name) of this factory.
Implements te::graph::AbstractGraphFactory.
Definition at line 42 of file GraphFactory.cpp.
References te::graph::Globals::sm_factoryGraphTypeGraph.
|
static |
It initializes the factory: the singleton instance will be registered in the abstract factory ...
Definition at line 58 of file GraphFactory.cpp.
Referenced by te::graph::Module::initialize().
|
protectedvirtual |
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. |
Implements te::graph::AbstractGraphFactory.
Definition at line 75 of file GraphFactory.cpp.
References te::graph::DatabaseGraphMetadata::load(), te::graph::AbstractGraphLoaderStrategyFactory::make(), te::graph::AbstractCachePolicyFactory::make(), te::da::DataSourceFactory::make(), and TR_GRAPH.
|
staticinherited |
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().
|
staticinherited |
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().
|
staticinherited |
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.
|
staticinherited |
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(), te::graph::AbstractGraphFactory::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.
|
staticinherited |
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.
|
staticinherited |
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(), te::graph::AbstractGraphFactory::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.
|
staticprivate |
Static instance used to register the factory.
Definition at line 101 of file GraphFactory.h.