#include <MetaObject.h>
Public Member Functions | |
bool | canCreate () const |
B * | create () const |
B & | instance () const |
bool | isAutoDelete (B *pObject) const |
MetaSingleton (const char *name) | |
~MetaSingleton () | |
Private Attributes | |
SingletonHolder< C > | _object |
A SingletonMetaObject disables the create() method and instead offers an instance() method to access the single instance of its class.
Definition at line 181 of file MetaObject.h.
Poco::MetaSingleton< C, B >::MetaSingleton | ( | const char * | name | ) | [inline] |
Definition at line 187 of file MetaObject.h.
Poco::MetaSingleton< C, B >::~MetaSingleton | ( | ) | [inline] |
Definition at line 191 of file MetaObject.h.
bool Poco::MetaSingleton< C, B >::canCreate | ( | ) | const [inline, virtual] |
Returns a reference to the only instance of the class. Used for singletons only.
Implements Poco::AbstractMetaObject< B >.
Definition at line 200 of file MetaObject.h.
B* Poco::MetaSingleton< C, B >::create | ( | ) | const [inline, virtual] |
Implements Poco::AbstractMetaObject< B >.
Definition at line 195 of file MetaObject.h.
B& Poco::MetaSingleton< C, B >::instance | ( | ) | const [inline, virtual] |
Create a new instance of a class. Cannot be used for singletons.
Implements Poco::AbstractMetaObject< B >.
Definition at line 205 of file MetaObject.h.
bool Poco::MetaSingleton< C, B >::isAutoDelete | ( | B * | pObject | ) | const [inline, virtual] |
Returns true if the object is owned by meta object.
Overloaded in MetaSingleton - returns true if the class is a singleton.
Reimplemented from Poco::AbstractMetaObject< B >.
Definition at line 210 of file MetaObject.h.
SingletonHolder<C> Poco::MetaSingleton< C, B >::_object [mutable, private] |
Definition at line 216 of file MetaObject.h.