te::graph::GraphFactory Class Reference

This is the concrete factory for the commung Graph type. More...

#include <GraphFactory.h>

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

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 > > &params) 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_typefind (const std::string &factoryKey)
 
static dictionary_typegetDictionary ()
 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 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::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::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::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::string &dsInfo, const std::map< std::string, std::string > &gInfo)
 It creates a graph with the given parameters. More...
 

Protected Member Functions

te::graph::AbstractGraphbuild ()
 Builder Function used to create the class object. More...
 
te::graph::AbstractGraphcreate (const 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::AbstractGraphiOpen (const std::string &, 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...
 

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 > &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::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 GraphFactorysm_factory
 Static instance used to register the factory. More...
 

Detailed Description

This is the concrete factory for the commung Graph type.

See also
te::graph::AbstractGraphFactory

Definition at line 44 of file GraphFactory.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

te::graph::GraphFactory::~GraphFactory ( )
inline

Destructor.

Definition at line 49 of file GraphFactory.h.

te::graph::GraphFactory::GraphFactory ( )
protected

Constructor.

Member Function Documentation

te::graph::AbstractGraph* te::graph::GraphFactory::build ( )
protectedvirtual

Builder Function used to create the class object.

Implements te::common::AbstractFactory< AbstractGraph, std::string >.

te::graph::AbstractGraph* te::graph::GraphFactory::create ( const std::string &  dsInfo,
const std::map< std::string, std::string > &  gInfo 
)
protectedvirtual

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.

Implements te::graph::AbstractGraphFactory.

static void te::graph::GraphFactory::finalize ( )
static

It finalizes the factory: the singleton instance will be destroyed and will be unregistered from the abstract factory ...

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)
staticprotectedinherited

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.
void te::graph::GraphFactory::getCreationalParameters ( std::vector< std::pair< std::string, std::string > > &  params) const
virtual

It returns the list of parameters accepted as graph info.

Implements te::graph::AbstractGraphFactory.

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 > &  gInfo)
staticprotectedinherited

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 
)
staticprotectedinherited

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::string &  dsInfo,
const std::map< std::string, std::string > &  gInfo 
)
staticprotectedinherited

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.
const std::string& te::graph::GraphFactory::getType ( ) const
virtual

Returns the type (name) of this factory.

Implements te::graph::AbstractGraphFactory.

static void te::graph::GraphFactory::initialize ( )
static

It initializes the factory: the singleton instance will be registered in the abstract factory ...

te::graph::AbstractGraph* te::graph::GraphFactory::iOpen ( const std::string &  ,
const std::map< std::string, std::string > &  gInfo 
)
protectedvirtual

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.

Implements te::graph::AbstractGraphFactory.

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

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)
staticinherited

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::string &  dsInfo,
const std::map< std::string, std::string > &  gInfo 
)
staticinherited

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::string &  dsInfo,
const std::map< std::string, std::string > &  gInfo 
)
staticinherited

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::string &  dsInfo,
const std::map< std::string, std::string > &  gInfo 
)
staticinherited

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::string &  dsInfo,
const std::map< std::string, std::string > &  gInfo 
)
staticinherited

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 
)
staticprotectedinherited

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.

GraphFactory* te::graph::GraphFactory::sm_factory
staticprivate

Static instance used to register the factory.

Definition at line 101 of file GraphFactory.h.


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