All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::graph::AbstractGraphLoaderStrategyFactory Class Referenceabstract

This is the abstract factory for graph loader strategy. More...

#include <AbstractGraphLoaderStrategyFactory.h>

Inheritance diagram for te::graph::AbstractGraphLoaderStrategyFactory:
te::common::AbstractFactory< AbstractGraphLoaderStrategy, std::string > te::graph::BoxLoaderStrategyFactory te::graph::SequenceLoaderStrategyFactory

Public Types

typedef FactoryDictionary
< AbstractFactory
< AbstractGraphLoaderStrategy,
std::string, TKEYCOMPARE >
, std::string, TKEYCOMPARE > 
dictionary_type
 
typedef AbstractFactory factory_type
 

Public Member Functions

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 ~AbstractGraphLoaderStrategyFactory ()
 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
AbstractGraphLoaderStrategy
make ()
 It creates and returns default graph loader strategy. More...
 
static
AbstractGraphLoaderStrategy
make (const std::string &lsType)
 It creates graph loader strategy with the proper type. More...
 
static
AbstractGraphLoaderStrategy
make (const std::string &lsType, GraphMetadata *gm)
 It creates graph loader strategy with the proper type. More...
 

Protected Member Functions

 AbstractGraphLoaderStrategyFactory (const std::string &factoryKey)
 Constructor. More...
 
virtual
AbstractGraphLoaderStrategy
build ()=0
 Concrete factories (derived from this one) must implement this method in order to create objects. More...
 
virtual
AbstractGraphLoaderStrategy
create (GraphMetadata *gm)=0
 This method must be implemented by subclasses (loader strategy types). 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...
 

Detailed Description

This is the abstract factory for graph loader strategy.

See also
AbstractGraphLoaderStrategy

Definition at line 48 of file AbstractGraphLoaderStrategyFactory.h.

Member Typedef Documentation

typedef FactoryDictionary<AbstractFactory<AbstractGraphLoaderStrategy , std::string , TKEYCOMPARE>, std::string , TKEYCOMPARE> te::common::AbstractFactory< AbstractGraphLoaderStrategy , std::string , TKEYCOMPARE >::dictionary_type
inherited

Definition at line 73 of file AbstractFactory.h.

typedef AbstractFactory te::common::AbstractFactory< AbstractGraphLoaderStrategy , std::string , TKEYCOMPARE >::factory_type
inherited

Definition at line 77 of file AbstractFactory.h.

Constructor & Destructor Documentation

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

Destructor.

Definition at line 87 of file AbstractGraphLoaderStrategyFactory.h.

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

Constructor.

Parameters
factoryKeyThe key that identifies the factory.

Definition at line 65 of file AbstractGraphLoaderStrategyFactory.cpp.

Member Function Documentation

virtual AbstractGraphLoaderStrategy * te::common::AbstractFactory< AbstractGraphLoaderStrategy , std::string , TKEYCOMPARE >::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::BoxLoaderStrategyFactory, and te::graph::SequenceLoaderStrategyFactory.

virtual AbstractGraphLoaderStrategy* te::graph::AbstractGraphLoaderStrategyFactory::create ( GraphMetadata gm)
protectedpure virtual

This method must be implemented by subclasses (loader strategy types).

Parameters
gm
Returns
A proper graph loader strategy.
Note
The caller will take the ownership of the returned pointer.

Implemented in te::graph::BoxLoaderStrategyFactory, and te::graph::SequenceLoaderStrategyFactory.

Referenced by make().

static const factory_type* te::common::AbstractFactory< AbstractGraphLoaderStrategy , std::string , TKEYCOMPARE >::find ( const std::string &  factoryKey)
staticinherited
static dictionary_type& te::common::AbstractFactory< AbstractGraphLoaderStrategy , std::string , TKEYCOMPARE >::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.
const std::string & te::common::AbstractFactory< AbstractGraphLoaderStrategy , std::string , TKEYCOMPARE >::getKey ( ) const
inherited

It returns the factory key associated to the concreate factory.

Returns
The factory key associated to the concreate factory.
virtual const std::string& te::graph::AbstractGraphLoaderStrategyFactory::getType ( ) const
pure virtual

Returns the type (name) of this factory.

Implemented in te::graph::BoxLoaderStrategyFactory, and te::graph::SequenceLoaderStrategyFactory.

te::graph::AbstractGraphLoaderStrategy * te::graph::AbstractGraphLoaderStrategyFactory::make ( )
static

It creates and returns default graph loader strategy.

Returns
A default graph loader strategy.
Note
The caller will take the ownership of the returned pointer.

Definition at line 37 of file AbstractGraphLoaderStrategyFactory.cpp.

References te::common::AbstractFactory< TPRODUCT, TFACTORYKEY, TKEYCOMPARE >::make(), and TE_DEFAULT_GRAPH_LOADER_STRATEGY_TYPE.

Referenced by te::graph::AbstractGraphFactory::getLoaderStrategy().

te::graph::AbstractGraphLoaderStrategy * te::graph::AbstractGraphLoaderStrategyFactory::make ( const std::string &  lsType)
static

It creates graph loader strategy with the proper type.

Parameters
lsTypeType The name of the specific graph loader strategy type to be used to create.
Returns
A proper graph loader strategy.
Note
The caller will take the ownership of the returned pointer.

Definition at line 42 of file AbstractGraphLoaderStrategyFactory.cpp.

References te::common::Convert2UCase(), and te::common::AbstractFactory< TPRODUCT, TFACTORYKEY, TKEYCOMPARE >::make().

te::graph::AbstractGraphLoaderStrategy * te::graph::AbstractGraphLoaderStrategyFactory::make ( const std::string &  lsType,
GraphMetadata gm 
)
static

It creates graph loader strategy with the proper type.

Parameters
lsTypeType The name of the specific graph loader strategy type to be used to create.
gmPointer to a class that defines the graph metadata
Returns
A proper graph loader strategy.
Note
The caller will take the ownership of the returned pointer.

Definition at line 49 of file AbstractGraphLoaderStrategyFactory.cpp.

References te::common::Convert2UCase(), create(), te::common::FactoryDictionary< TFACTORY, TFACTORYKEY, TKEYCOMPARE >::find(), te::common::AbstractFactory< TPRODUCT, TFACTORYKEY, TKEYCOMPARE >::getDictionary(), and TE_TR.

Member Data Documentation

std::string te::common::AbstractFactory< AbstractGraphLoaderStrategy , std::string , TKEYCOMPARE >::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 files: