1 #ifndef CORE_ClassFactory_H 2 #define CORE_ClassFactory_H 66 inline static SP::CORE_ClassFactory
New() {
78 mRegisteredClasses.
clear();
79 mRegisteredConstClasses.
clear();
87 mRegisteredClasses.
put(key,c);
94 mRegisteredConstClasses.
put(key,c);
101 mClassFactories.add(cf);
107 mClassFactories.clear();
118 return mRegisteredClasses[key];
126 return mRegisteredConstClasses[key];
137 const SVC::CORE_Object& newParameters)
const;
144 SVC::CORE_Object args;
SV::CORE_ClassFactory mClassFactories
Definition: CORE_ClassFactory.h:29
void addClass(const tString &key, SP::CORE_Object c)
add registered class
Definition: CORE_ClassFactory.h:86
SPC::CORE_Object getConstClass(const tString &key)
get the read only registered class with key
Definition: CORE_ClassFactory.h:125
SP::CORE_Object getClass(const tString &key)
get the written registered class with key
Definition: CORE_ClassFactory.h:117
virtual SP::CORE_Object NewInstance(const tString &name) const
create an instance of a class
Definition: CORE_ClassFactory.h:143
void addClassFactory(SP::CORE_ClassFactory cf)
add to class factory
Definition: CORE_ClassFactory.h:100
CORE_SharedPointersVMap< tString, CORE_Object > mRegisteredClasses
Definition: CORE_ClassFactory.h:26
CORE_ClassFactory()
build a CORE_ClassFactory
Definition: CORE_ClassFactory.cpp:6
void clearClassFactories()
clear class factories
Definition: CORE_ClassFactory.h:106
DEFINE_SPTR(CORE_ClassFactory)
DEFINE_SVPTR(CORE_ClassFactory)
virtual SP::CORE_Object NewInstance(const tString &name, const SVC::CORE_Object &newParameters) const
create an instance of a class
Definition: CORE_ClassFactory.cpp:15
void addConstClass(const tString &key, SPC::CORE_Object c)
add an unwritten registered class
Definition: CORE_ClassFactory.h:93
CORE_SharedPointersVMap< tString, const CORE_Object > mRegisteredConstClasses
Definition: CORE_ClassFactory.h:27
void clear()
clear the map
Definition: CORE_SharedPointersVMap.h:258
abstract base class for most classes.
Definition: CORE_Object.h:53
#define tString
Definition: types.h:135
virtual ~CORE_ClassFactory(void)
destroy a CORE_ClassFactory
Definition: CORE_ClassFactory.cpp:10
void clearClasses()
clear registered classes
Definition: CORE_ClassFactory.h:77
SP_OBJECT(CORE_ClassFactory)
this class describes a class factory to generate classes for User Interface Software ...
Definition: CORE_ClassFactory.h:18
static SP::CORE_ClassFactory New()
create a shared pointer to the class factory
Definition: CORE_ClassFactory.h:66
tBoolean put(const Key &k, const boost::shared_ptr< Value > &v)
set the value at the index k
Definition: CORE_SharedPointersVMap.h:192
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:141