log4cplus_spi_FactoryRegistry(3)

log4cplus::spi::FactoryRegistry< T >(3) log4cplus log4cplus::spi::FactoryRegistry< T >(3)

NAME

log4cplus::spi::FactoryRegistry< T > - This template class is used as a 'Factory Registry'.

SYNOPSIS

#include <factory.h>

Inherits log4cplus::spi::ObjectRegistryBase.

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. T * get (const log4cplus::tstring &name) const
Used to retrieve an object from the registry.

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

Protected Member Functions


virtual void deleteObject (void *object) const
Deletes object.

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

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

Detailed Description

template<class T>

class log4cplus::spi::FactoryRegistry< T >"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.

Definition at line 149 of file factory.h.

Member Typedef Documentation

template<class T > typedef T log4cplus::spi::FactoryRegistry< T >::product_type

Definition at line 153 of file factory.h.

Constructor & Destructor Documentation

template<class T > virtual log4cplus::spi::FactoryRegistry< T >::~FactoryRegistry () [inline], [virtual]

Definition at line 155 of file factory.h.

Member Function Documentation

template<class T > virtual void log4cplus::spi::FactoryRegistry< T >::deleteObject (void * object) const [inline], [protected], [virtual]

Deletes object.

Implements log4cplus::spi::ObjectRegistryBase.

Definition at line 179 of file factory.h.

template<class T > T * log4cplus::spi::FactoryRegistry< T >::get (const log4cplus::tstring & name) const [inline]

Used to retrieve an object from the registry. (The registry owns the returned pointer.)

Definition at line 174 of file factory.h.

template<class T > bool log4cplus::spi::FactoryRegistry< T >::put (std::unique_ptr< T > object) [inline]

Used to enter an object into the registry. (The registry now owns object.)

Definition at line 164 of file factory.h.

Author

Generated automatically by Doxygen for log4cplus from the source code.

Mon Jun 5 2023 21:46:10 Version 2.0.7