log4cplus  2.1.0
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
log4cplus::spi::ObjectRegistryBase Class Referenceabstract

This is the base class used to implement the functionality required by the ObjectRegistry template class. More...

#include <objectregistry.h>

Inheritance diagram for log4cplus::spi::ObjectRegistryBase:
[legend]
Collaboration diagram for log4cplus::spi::ObjectRegistryBase:
[legend]

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. More...
 
std::vector< log4cplus::tstringgetAllNames () const
 Returns the names of all registered objects. More...
 
void _enableLocking (bool)
 This function is internal implementation detail. More...
 

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. More...
 
void * getVal (const log4cplus::tstring &name) const
 Used to retrieve an object from the registry. More...
 
virtual void deleteObject (void *object) const =0
 Deletes object. More...
 
virtual void clear ()
 Deletes all objects from this registry. More...
 

Protected Attributes

thread::Mutex mutex
 
ObjectMap data
 

Detailed Description

This is the base class used to implement the functionality required by the ObjectRegistry template class.

Definition at line 47 of file objectregistry.h.

Member Typedef Documentation

◆ ObjectMap

Definition at line 95 of file objectregistry.h.

Constructor & Destructor Documentation

◆ ObjectRegistryBase()

log4cplus::spi::ObjectRegistryBase::ObjectRegistryBase ( )
protected

◆ ~ObjectRegistryBase()

virtual log4cplus::spi::ObjectRegistryBase::~ObjectRegistryBase ( )
protectedvirtual

Member Function Documentation

◆ _enableLocking()

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.

◆ clear()

virtual void log4cplus::spi::ObjectRegistryBase::clear ( )
protectedvirtual

Deletes all objects from this registry.

◆ deleteObject()

virtual void log4cplus::spi::ObjectRegistryBase::deleteObject ( void *  object) const
protectedpure virtual

Deletes object.

Implemented in log4cplus::spi::FactoryRegistry< T >.

◆ exists()

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.

◆ getAllNames()

std::vector<log4cplus::tstring> log4cplus::spi::ObjectRegistryBase::getAllNames ( ) const

Returns the names of all registered objects.

◆ getVal()

void* log4cplus::spi::ObjectRegistryBase::getVal ( const log4cplus::tstring name) const
protected

Used to retrieve an object from the registry.

(The registry owns the returned pointer.)

◆ putVal()

bool log4cplus::spi::ObjectRegistryBase::putVal ( const log4cplus::tstring name,
void *  object 
)
protected

Used to enter an object into the registry.

(The registry now owns object.)

Member Data Documentation

◆ data

ObjectMap log4cplus::spi::ObjectRegistryBase::data
protected

Definition at line 99 of file objectregistry.h.

◆ mutex

thread::Mutex log4cplus::spi::ObjectRegistryBase::mutex
protected

Definition at line 98 of file objectregistry.h.


The documentation for this class was generated from the following file: