log4cplus
2.1.0
|
This template class is used as a "Factory Registry". More...
#include <factory.h>
Public Types | |
typedef T | product_type |
Public Member Functions | |
virtual | ~FactoryRegistry () |
bool | put (std::unique_ptr< T > object) |
Used to enter an object into the registry. More... | |
T * | get (const log4cplus::tstring &name) const |
Used to retrieve an object from the registry. More... | |
Public Member Functions inherited from log4cplus::spi::ObjectRegistryBase | |
bool | exists (const log4cplus::tstring &name) const |
Tests to see whether or not an object is bound in the registry as name . More... | |
std::vector< log4cplus::tstring > | getAllNames () const |
Returns the names of all registered objects. More... | |
void | _enableLocking (bool) |
This function is internal implementation detail. More... | |
Protected Member Functions | |
virtual void | deleteObject (void *object) const |
Deletes object . More... | |
Protected Member Functions inherited from log4cplus::spi::ObjectRegistryBase | |
ObjectRegistryBase () | |
virtual | ~ObjectRegistryBase () |
bool | putVal (const log4cplus::tstring &name, void *object) |
Used to enter an object into the registry. More... | |
void * | getVal (const log4cplus::tstring &name) const |
Used to retrieve an object from the registry. More... | |
virtual void | clear () |
Deletes all objects from this registry. More... | |
Additional Inherited Members | |
Protected Types inherited from log4cplus::spi::ObjectRegistryBase | |
typedef std::map< log4cplus::tstring, void * > | ObjectMap |
Protected Attributes inherited from log4cplus::spi::ObjectRegistryBase | |
thread::Mutex | mutex |
ObjectMap | data |
This template class is used as a "Factory Registry".
Objects are "entered" into the registry with a "name" using the put()
method. (The registry then owns the object.) These object can then be retrieved using the get()
method.
Note: This class is Thread-safe.
typedef T log4cplus::spi::FactoryRegistry< T >::product_type |
|
inlinevirtual |
|
inlineprotectedvirtual |
Deletes object
.
Implements log4cplus::spi::ObjectRegistryBase.
|
inline |
|
inline |