te::graph::AbstractGraphFactory Class Referenceabstract

This is the abstract factory for Graphs. More...

#include <AbstractGraphFactory.h>

Inheritance diagram for te::graph::AbstractGraphFactory:
te::common::AbstractFactory< AbstractGraph, std::string > te::graph::BidirectionalGraphFactory te::graph::DirectedGraphFactory te::graph::GraphFactory te::graph::UndirectedGraphFactory

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 > > &params) 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_typefind (const std::string &factoryKey)
 
static dictionary_typegetDictionary ()
 It returns a reference to the internal dictionary of concrete factories. More...
 
static AbstractGraphmake ()
 It creates and returns an empty graph with default graph type. More...
 
static AbstractGraphmake (const std::string &gType)
 It creates an empty graph with the proper type. More...
 
static AbstractGraphmake (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 AbstractGraphmake (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 AbstractGraphopen (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 AbstractGraphopen (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 AbstractGraphbuild ()=0
 Concrete factories (derived from this one) must implement this method in order to create objects. More...
 
virtual AbstractGraphcreate (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 AbstractGraphiOpen (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...
 

Static Protected Member Functions

static te::graph::AbstractCachePolicygetCachePolicy (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::AbstractGraphLoaderStrategygetLoaderStrategy (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::GraphMetadatagetMetadata (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...
 

Detailed Description

This is the abstract factory for Graphs.

See also
AbstractGraph

Definition at line 51 of file AbstractGraphFactory.h.

Member Typedef Documentation

typedef FactoryDictionary<AbstractFactory<AbstractGraph , std::string , std::less<std::string > >, std::string , std::less<std::string > > te::common::AbstractFactory< AbstractGraph , std::string , std::less<std::string > >::dictionary_type
inherited

Definition at line 73 of file AbstractFactory.h.

typedef AbstractFactory te::common::AbstractFactory< AbstractGraph , std::string , std::less<std::string > >::factory_type
inherited

Definition at line 77 of file AbstractFactory.h.

Constructor & Destructor Documentation

virtual te::graph::AbstractGraphFactory::~AbstractGraphFactory ( )
inlinevirtual

Destructor.

Definition at line 129 of file AbstractGraphFactory.h.

te::graph::AbstractGraphFactory::AbstractGraphFactory ( const std::string &  factoryKey)
protected

Constructor.

Parameters
factoryKeyThe key that identifies the factory.

Member Function Documentation

virtual AbstractGraph * te::common::AbstractFactory< AbstractGraph , std::string , std::less<std::string > >::build ( )
protectedpure virtualinherited

Concrete factories (derived from this one) must implement this method in order to create objects.

Returns
It returns an object created by the concrete factory.

Implemented in te::graph::BidirectionalGraphFactory, te::graph::DirectedGraphFactory, te::graph::GraphFactory, and te::graph::UndirectedGraphFactory.

virtual AbstractGraph* te::graph::AbstractGraphFactory::create ( const std::map< std::string, std::string > &  dsInfo,
const std::map< std::string, std::string > &  gInfo 
)
protectedpure virtual

This method must be implemented by subclasses (graph types).

Parameters
dsInfoThe necessary information to access the data source.
gInfoThe necessary information to create the graph.
Returns
The new graph.
Note
The caller will take the ownership of the returned pointer.

Implemented in te::graph::BidirectionalGraphFactory, te::graph::DirectedGraphFactory, te::graph::GraphFactory, and te::graph::UndirectedGraphFactory.

static const factory_type* te::common::AbstractFactory< AbstractGraph , std::string , std::less<std::string > >::find ( const std::string &  factoryKey)
staticinherited
static te::graph::AbstractCachePolicy* te::graph::AbstractGraphFactory::getCachePolicy ( const std::map< std::string, std::string > &  gInfo)
staticprotected

This method is a auxiliar function used to get the cache policy pointer.

Parameters
gInfoThe necessary information to create the graph.
Returns
The graph cache policy pointer.
Note
The caller will take the ownership of the returned pointer.
virtual void te::graph::AbstractGraphFactory::getCreationalParameters ( std::vector< std::pair< std::string, std::string > > &  params) const
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.

static dictionary_type& te::common::AbstractFactory< AbstractGraph , std::string , std::less<std::string > >::getDictionary ( )
staticinherited

It returns a reference to the internal dictionary of concrete factories.

The dictionary is a singleton.

Returns
A reference to the internal dictionary.
static int te::graph::AbstractGraphFactory::getId ( const std::map< std::string, std::string > &  dsInfo,
const std::map< std::string, std::string > &  gInfo 
)
staticprotected

This method is a auxiliar function used to get the graph id.

Parameters
gInfoThe necessary information to create the graph.
Returns
The graph id.
const std::string & te::common::AbstractFactory< AbstractGraph , std::string , std::less<std::string > >::getKey ( ) const
inherited

It returns the factory key associated to the concreate factory.

Returns
The factory key associated to the concreate factory.
static te::graph::AbstractGraphLoaderStrategy* te::graph::AbstractGraphFactory::getLoaderStrategy ( const std::map< std::string, std::string > &  gInfo,
te::graph::GraphMetadata metadata 
)
staticprotected

This method is a auxiliar function used to get the loader strategy pointer.

Parameters
gInfoThe necessary information to create the graph.
metadataThe graph metadata pointer.
Returns
The graph loader strategy pointer.
Note
The caller will take the ownership of the returned pointer.
static te::graph::GraphMetadata* te::graph::AbstractGraphFactory::getMetadata ( const std::map< std::string, std::string > &  dsInfo,
const std::map< std::string, std::string > &  gInfo 
)
staticprotected

This method is a auxiliar function used to get the metadata pointer.

Parameters
dsInfoThe necessary information to access the data source.
gInfoThe necessary information to create the graph.
Returns
The graph metadata pointer.
Note
The caller will take the ownership of the returned pointer.
virtual const std::string& te::graph::AbstractGraphFactory::getType ( ) const
pure virtual
virtual AbstractGraph* te::graph::AbstractGraphFactory::iOpen ( const std::map< std::string, std::string > &  dsInfo,
const std::map< std::string, std::string > &  gInfo 
)
protectedpure virtual

This method must be re-implemented by subclasses in order to have a finner control for the graph object instantiation.

Parameters
dsInfoThe necessary information to access the data source.
gInfoThe necessary information to create the graph.
Returns
A graph.
Note
The caller will take the ownership of the returned pointer.

Implemented in te::graph::BidirectionalGraphFactory, te::graph::DirectedGraphFactory, te::graph::GraphFactory, and te::graph::UndirectedGraphFactory.

static AbstractGraph* te::graph::AbstractGraphFactory::make ( )
static

It creates and returns an empty graph with default graph type.

Returns
An empty graph.
Note
The caller will take the ownership of the returned pointer.
static AbstractGraph* te::graph::AbstractGraphFactory::make ( const std::string &  gType)
static

It creates an empty graph with the proper type.

Parameters
gTypeThe name of the specific graph type to be used to create the graph.
Returns
An empty graph.
Note
The caller will take the ownership of the returned pointer.
static AbstractGraph* te::graph::AbstractGraphFactory::make ( const std::map< std::string, std::string > &  dsInfo,
const std::map< std::string, std::string > &  gInfo 
)
static

It creates a graph with the given parameters using the default graph type.

Parameters
dsInfoThe necessary information to access the data source.
gInfoThe necessary information to create the graph.
Returns
A new graph.
Note
The caller will take the ownership of the returned pointer.
static AbstractGraph* te::graph::AbstractGraphFactory::make ( const std::string &  gType,
const std::map< std::string, std::string > &  dsInfo,
const std::map< std::string, std::string > &  gInfo 
)
static

It creates a graph with the given parameters using the default graph type.

Parameters
gTypeThe name of the specific driver to create the raster.
dsInfoThe necessary information to access the data source.
gInfoThe necessary information to create the graph.
Returns
A new graph.
Note
The caller will take the ownership of the returned pointer.
static AbstractGraph* te::graph::AbstractGraphFactory::open ( const std::map< std::string, std::string > &  dsInfo,
const std::map< std::string, std::string > &  gInfo 
)
static

It opens a graph with the given parameters and default graph type.

Parameters
dsInfoThe necessary information to access the data source.
gInfoThe necessary information to create the graph.
Returns
The opened graph.
Note
The caller will take the ownership of the returned pointer.
static AbstractGraph* te::graph::AbstractGraphFactory::open ( const std::string &  gType,
const std::map< std::string, std::string > &  dsInfo,
const std::map< std::string, std::string > &  gInfo 
)
static

It creates a graph with the given parameters.

Parameters
gTypeThe name of the specific graph type to create the graph.
dsInfoThe necessary information to access the data source.
gInfoThe necessary information to create the graph.
Returns
The opened graph.
Note
The caller will take the ownership of the returned pointer.
static void te::graph::AbstractGraphFactory::setMetadataInformation ( const std::map< std::string, std::string > &  gInfo,
te::graph::GraphMetadata metadata 
)
staticprotected

Member Data Documentation

std::string te::common::AbstractFactory< AbstractGraph , std::string , std::less<std::string > >::m_factoryKey
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.


The documentation for this class was generated from the following file: