This is the concrete factory for the undirected Graph type. More...
#include <UndirectedGraphFactory.h>
Public Types | |
typedef FactoryDictionary < AbstractFactory < AbstractGraph, std::string, TKEYCOMPARE >, std::string, TKEYCOMPARE > | 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... | |
~UndirectedGraphFactory () | |
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... | |
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... | |
UndirectedGraphFactory () | |
Constructor. More... | |
Static Protected Member Functions | |
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. More... | |
static int | getId (const std::map< std::string, std::string > &dsInfo, const std::map< std::string, std::string > &gInfo) |
This method is a auxiliar function used to get the graph id. More... | |
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. More... | |
static te::graph::GraphMetadata * | getMetadata (const std::map< std::string, std::string > &dsInfo, const std::map< std::string, std::string > &gInfo) |
This method is a auxiliar function used to get the metadata pointer. More... | |
static void | setMetadataInformation (const std::map< std::string, std::string > &gInfo, te::graph::GraphMetadata *metadata) |
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 UndirectedGraphFactory * | sm_factory |
Static instance used to register the factory. More... | |
This is the concrete factory for the undirected Graph type.
Definition at line 44 of file UndirectedGraphFactory.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 UndirectedGraphFactory.h.
|
protected |
Constructor.
Definition at line 66 of file UndirectedGraphFactory.cpp.
|
protectedvirtual |
Builder Function used to create the class object.
Implements te::common::AbstractFactory< AbstractGraph, std::string >.
Definition at line 142 of file UndirectedGraphFactory.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 106 of file UndirectedGraphFactory.cpp.
References te::graph::GraphMetadata::m_memoryGraph, te::graph::GraphMetadata::save(), and TE_TR.
|
static |
It finalizes the factory: the singleton instance will be destroyed and will be unregistered from the abstract factory ...
Definition at line 60 of file UndirectedGraphFactory.cpp.
Referenced by te::graph::Module::finalize().
|
staticinherited |
|
staticprotectedinherited |
This method is a auxiliar function used to get the cache policy pointer.
gInfo | The necessary information to create the graph. |
Definition at line 156 of file AbstractGraphFactory.cpp.
References te::graph::AbstractCachePolicyFactory::make().
|
virtual |
It returns the list of parameters accepted as graph info.
Implements te::graph::AbstractGraphFactory.
Definition at line 43 of file UndirectedGraphFactory.cpp.
|
staticinherited |
It returns a reference to the internal dictionary of concrete factories.
The dictionary is a singleton.
|
staticprotectedinherited |
This method is a auxiliar function used to get the graph id.
gInfo | The necessary information to create the graph. |
Definition at line 143 of file AbstractGraphFactory.cpp.
|
inherited |
It returns the factory key associated to the concreate factory.
|
staticprotectedinherited |
This method is a auxiliar function used to get the loader strategy pointer.
gInfo | The necessary information to create the graph. |
metadata | The graph metadata pointer. |
Definition at line 172 of file AbstractGraphFactory.cpp.
References te::graph::AbstractGraphLoaderStrategyFactory::make().
|
staticprotectedinherited |
This method is a auxiliar function used to get the metadata pointer.
dsInfo | The necessary information to access the data source. |
gInfo | The necessary information to create the graph. |
Definition at line 105 of file AbstractGraphFactory.cpp.
References te::graph::GraphMetadata::m_memoryGraph, and te::da::DataSourceFactory::make().
|
virtual |
Returns the type (name) of this factory.
Implements te::graph::AbstractGraphFactory.
Definition at line 38 of file UndirectedGraphFactory.cpp.
References te::graph::Globals::sm_factoryGraphTypeUndirectedGraph.
|
static |
It initializes the factory: the singleton instance will be registered in the abstract factory ...
Definition at line 54 of file UndirectedGraphFactory.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 71 of file UndirectedGraphFactory.cpp.
References te::graph::GraphMetadata::load(), te::graph::GraphMetadata::m_memoryGraph, and TE_TR.
|
staticinherited |
It creates and returns an empty graph with default graph type.
Definition at line 42 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(), te::graph::FlowGraphBuilder::build(), te::sa::MinimumSpanningTree::createGraph(), te::sa::SpatialWeightsExchanger::importFromGAL(), te::sa::SpatialWeightsExchanger::importFromGWT(), and te::sa::GPMBuilder::setGPMInfo().
|
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 47 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 54 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 59 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 TE_TR.
|
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 77 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 82 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 TE_TR.
|
staticprotectedinherited |
Definition at line 188 of file AbstractGraphFactory.cpp.
References te::graph::Edge_List, te::graph::GraphMetadata::setDescription(), te::graph::GraphMetadata::setName(), te::graph::GraphMetadata::setStorageMode(), TE_GRAPH_STORAGE_MODE_BY_EDGE, TE_GRAPH_STORAGE_MODE_BY_VERTEX, and te::graph::Vertex_List.
|
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 UndirectedGraphFactory.h.