26 #ifndef __TERRALIB_COMMON_INTERNAL_PARAMETERIZEDABSTRACTFACTORY_H 
   27 #define __TERRALIB_COMMON_INTERNAL_PARAMETERIZEDABSTRACTFACTORY_H 
   64     template<
class TPRODUCT, 
class TFACTORYKEY, 
class TPARAM, 
class TKEYCOMPARE=std::less<TFACTORYKEY> >
 
   78         const TFACTORYKEY& 
getKey() 
const;
 
   92         static TPRODUCT* 
make(
const TFACTORYKEY& factoryKey, TPARAM p);
 
  110         virtual TPRODUCT* 
build(TPARAM p) = 0;
 
  154     template<
class TPRODUCT, 
class TFACTORYKEY, 
class TPARAM, 
class TKEYCOMPARE> 
inline 
  160     template<
class TPRODUCT, 
class TFACTORYKEY, 
class TPARAM, 
class TKEYCOMPARE> 
inline 
  167         return factory->
build(p);
 
  172     template<
class TPRODUCT, 
class TFACTORYKEY, 
class TPARAM, 
class TKEYCOMPARE> 
inline 
  176       return factoryDictionary;
 
  179     template<
class TPRODUCT, 
class TFACTORYKEY, 
class TPARAM, 
class TKEYCOMPARE> 
inline 
  181       : m_factoryKey(factoryKey)
 
  186     template<
class TPRODUCT, 
class TFACTORYKEY, 
class TPARAM, 
class TKEYCOMPARE> 
inline 
  189       getDictionary().remove(m_factoryKey);
 
A dictionary for a Factory.
 
#define TE_TR(message)
It marks a string in order to get translated.
 
This class is designed to declare objects to be thrown as exceptions by TerraLib.
 
This class represents a dictionary of factories.
 
void insert(const TFACTORYKEY &factoryKey, TFACTORY *factory)
It inserts a pointer to a factory and makes it associated to the factory key.
 
This class defines the basic interface of an abstract factory that makes use of parameters to constru...
 
static TPRODUCT * make(const TFACTORYKEY &factoryKey, TPARAM p)
It creates an object with the appropriated factory.
 
ParameterizedAbstractFactory & operator=(const ParameterizedAbstractFactory &rhs)
Assignment operator not allowed.
 
ParameterizedAbstractFactory(const TFACTORYKEY &factoryKey)
It creates the factory.
 
virtual ~ParameterizedAbstractFactory()
Virtual destructor.
 
virtual TPRODUCT * build(TPARAM p)=0
Concrete factories (derived from this one) must implement this method in order to create objects.
 
static dictionary_type & getDictionary()
It returns a reference to the internal dictionary.
 
ParameterizedAbstractFactory(const ParameterizedAbstractFactory &rhs)
Copy constructor not allowed.
 
TFACTORYKEY m_factoryKey
The key that identifies the concrete factory: it will be used for unregistering the factory during de...
 
FactoryDictionary< ParameterizedAbstractFactory< TPRODUCT, TFACTORYKEY, TPARAM, TKEYCOMPARE >, TFACTORYKEY, TKEYCOMPARE > dictionary_type
 
const TFACTORYKEY & getKey() const
It returns the factory key associated to the concreate factory.