26 #ifndef __TERRALIB_COMMON_INTERNAL_ABSTRACTFACTORY_H    27 #define __TERRALIB_COMMON_INTERNAL_ABSTRACTFACTORY_H    31 #include "../core/Exception.h"    33 #include <boost/noncopyable.hpp>    68     template<
class TPRODUCT, 
class TFACTORYKEY, 
class TKEYCOMPARE = std::less<TFACTORYKEY> >
    84         const TFACTORYKEY& 
getKey() 
const;
    97         static TPRODUCT* 
make(
const TFACTORYKEY& factoryKey);
   118         virtual TPRODUCT* 
build() = 0;
   139     template<
class TPRODUCT, 
class TFACTORYKEY, 
class TKEYCOMPARE> 
inline   145     template<
class TPRODUCT, 
class TFACTORYKEY, 
class TKEYCOMPARE> 
inline   151         return factory->
build();
   156     template<
class TPRODUCT, 
class TFACTORYKEY, 
class TKEYCOMPARE> 
inline   160       return factoryDictionary;
   163     template<
class TPRODUCT, 
class TFACTORYKEY, 
class TKEYCOMPARE> 
inline   171     template<
class TPRODUCT, 
class TFACTORYKEY, 
class TKEYCOMPARE> 
inline   173       : m_factoryKey(factoryKey)
   175       getDictionary().insert(factoryKey, 
this);
   178     template<
class TPRODUCT, 
class TFACTORYKEY, 
class TKEYCOMPARE> 
inline   181       getDictionary().remove(m_factoryKey);
   187 #endif  // __TERRALIB_COMMON_INTERNAL_ABSTRACTFACTORY_H const TFACTORYKEY & getKey() const
It returns the factory key associated to the concreate factory. 
 
This class defines the interface of abstract factories without initializing parameters. 
 
FactoryDictionary< AbstractFactory< TPRODUCT, TFACTORYKEY, TKEYCOMPARE >, TFACTORYKEY, TKEYCOMPARE > dictionary_type
 
virtual ~AbstractFactory()
Virtual destructor. 
 
AbstractFactory factory_type
 
static dictionary_type & getDictionary()
It returns a reference to the internal dictionary of concrete factories. 
 
#define TE_TR(message)
It marks a string in order to get translated. 
 
A dictionary for a Factory. 
 
AbstractFactory(const TFACTORYKEY &factoryKey)
It creates the factory and automatically registers it in the dictionary. 
 
This class is designed to declare objects to be thrown as exceptions by TerraLib. ...
 
static TPRODUCT * make(const TFACTORYKEY &factoryKey)
It creates an object with the appropriated factory. 
 
static const factory_type * find(const TFACTORYKEY &factoryKey)
 
TFACTORYKEY m_factoryKey
The key that identifies the concrete factory: it will be used for unregistering the factory during de...
 
virtual TPRODUCT * build()=0
Concrete factories (derived from this one) must implement this method in order to create objects...
 
This class represents a dictionary of factories.