|
log4cplus 2.0.8
|
This is the base class used to implement the functionality required by the ObjectRegistry template class. More...
#include <objectregistry.h>
Public Member Functions | |
| bool | exists (const log4cplus::tstring &name) const |
Tests to see whether or not an object is bound in the registry as name. | |
| std::vector< log4cplus::tstring > | getAllNames () const |
| Returns the names of all registered objects. | |
| void | _enableLocking (bool) |
Protected Types | |
| typedef std::map< log4cplus::tstring, void * > | ObjectMap |
Protected Member Functions | |
| ObjectRegistryBase () | |
| virtual | ~ObjectRegistryBase () |
| bool | putVal (const log4cplus::tstring &name, void *object) |
| Used to enter an object into the registry. | |
| void * | getVal (const log4cplus::tstring &name) const |
| Used to retrieve an object from the registry. | |
| virtual void | deleteObject (void *object) const =0 |
Deletes object. | |
| virtual void | clear () |
| Deletes all objects from this registry. | |
Protected Attributes | |
| thread::Mutex | mutex |
| ObjectMap | data |
This is the base class used to implement the functionality required by the ObjectRegistry template class.
Definition at line 47 of file objectregistry.h.
|
protected |
Definition at line 95 of file objectregistry.h.
|
protected |
|
protectedvirtual |
| void log4cplus::spi::ObjectRegistryBase::_enableLocking | ( | bool | ) |
This function is internal implementation detail. It is related to work-around needed for initialization when using C++11 threads and mutexes.
|
protectedvirtual |
Deletes all objects from this registry.
Referenced by log4cplus::spi::FactoryRegistry< AppenderFactory >::~FactoryRegistry().
|
protectedpure virtual |
| bool log4cplus::spi::ObjectRegistryBase::exists | ( | const log4cplus::tstring & | name | ) | const |
Tests to see whether or not an object is bound in the registry as name.
| std::vector< log4cplus::tstring > log4cplus::spi::ObjectRegistryBase::getAllNames | ( | ) | const |
Returns the names of all registered objects.
|
protected |
Used to retrieve an object from the registry.
(The registry owns the returned pointer.)
Referenced by log4cplus::spi::FactoryRegistry< AppenderFactory >::get().
|
protected |
Used to enter an object into the registry.
(The registry now owns object.)
Referenced by log4cplus::spi::FactoryRegistry< AppenderFactory >::put().
|
protected |
Definition at line 99 of file objectregistry.h.
|
protected |
Definition at line 98 of file objectregistry.h.