Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# log4cplus::spi::FactoryRegistry< T > Class Template Reference

This template class is used as a "Factory Registry". More...

`#include <factory.h>`

Inheritance diagram for log4cplus::spi::FactoryRegistry< T >:

[legend]
Collaboration diagram for log4cplus::spi::FactoryRegistry< T >:

[legend]
List of all members.

## Public Member Functions
virtual | ~FactoryRegistry ()
bool | put (std::auto_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.
## Protected Member Functions
virtual void | deleteObject (void *object) const
| Deletes `object`.

## 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 122 of file factory.h.

## Constructor & Destructor Documentation

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

| Definition at line 124 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 148 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 143 of file factory.h.

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

| Used to enter an object into the registry. (The registry now owns `object`.) Definition at line 133 of file factory.h.

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

- factory.h