## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# scfImplementationPooled< Super > Class Template Reference
[Shared Class Facility (SCF)]

Derive an SCF implementation from this class to have it pooled. More...

`#include <csutil/pooledscfclass.h>`

List of all members.

## Public Types

typedef scfImplementationPooled< Super > | scfPooledImplementationType

## Public Member Functions

void | DecRef ()
| DecRef() implementation that returns the object to the pool.
void * | operator new (size_t n, Pool &p)
| Allocate a new instance of a pooled SCF class.
void | operator delete (void *instance)
void | operator delete (void *instance, Pool &p)
| Recycle a new instance of a pooled SCF class.
template<typename A, typename B, typename C, typename D, typename E>
| scfImplementationPooled (scfClassType *object, A a, B b, C c, D d, E e)
template<typename A, typename B, typename C, typename D>
| scfImplementationPooled (scfClassType *object, A a, B b, C c, D d)
template<typename A, typename B, typename C>
| scfImplementationPooled (scfClassType *object, A a, B b, C c)
template<typename A, typename B>
| scfImplementationPooled (scfClassType *object, A a, B b)
template<typename A>
| scfImplementationPooled (scfClassType *object, A a)
| scfImplementationPooled (scfClassType *object)
| Constructor.

## Protected Attributes

Pool * | scfPool
| Pointer to the pool this instance is from.

## Classes

class | Pool

## Detailed Description

### template<typename Super>
class scfImplementationPooled< Super >

Derive an SCF implementation from this class to have it pooled.

- The Super template argument is the scfImplementation...<> class you would normally use.

       class csFoo :
         public scfImplementationPooled<scfImplementation1<csFoo,
                                                           iFoo> >
       {
         ...
       };

- A pooled class must needs to have the scfPooledImplementationType class in its initializer list:

         csFoo () : scfPooledImplementationType (this) { ... }

- To obtain an instance of Class, use new with the pool object as the placement argument:

         csFoo::Pool fooPool;
         ...
         csRef<csFoo> foo; foo.AttachNew (new (fooPool) csFoo);

Definition at line 61 of file pooledscfclass.h.

## Constructor & Destructor Documentation

template<typename Super>

scfImplementationPooled< Super >::scfImplementationPooled | ( | scfClassType * | object | ) | `[inline]`

Constructor.

Call from the derived class with 'this' as first argument.

Definition at line 171 of file pooledscfclass.h.

## Member Function Documentation

template<typename Super>

void scfImplementationPooled< Super >::DecRef | ( |  | ) | `[inline]`

DecRef() implementation that returns the object to the pool.

Definition at line 157 of file pooledscfclass.h.

template<typename Super>

void scfImplementationPooled< Super >::operator delete | ( | void * | instance,
|  | Pool & | p |
| ) |  |  | `[inline]`

Recycle a new instance of a pooled SCF class.

Definition at line 140 of file pooledscfclass.h.

Referenced by scfImplementationPooled< scfImplementationExt0< csParasiticDataBufferPooled, csParasiticDataBufferBase > >::operator delete().

template<typename Super>

void* scfImplementationPooled< Super >::operator new | ( | size_t | n,
|  | Pool & | p |
| ) |  |  | `[inline]`

Allocate a new instance of a pooled SCF class.

Definition at line 107 of file pooledscfclass.h.

## Member Data Documentation

template<typename Super>

Pool* scfImplementationPooled< Super >::scfPool `[protected]`

Pointer to the pool this instance is from.

Definition at line 104 of file pooledscfclass.h.

Referenced by scfImplementationPooled< scfImplementationExt0< csParasiticDataBufferPooled, csParasiticDataBufferBase > >::operator delete(), and scfImplementationPooled< scfImplementationExt0< csParasiticDataBufferPooled, csParasiticDataBufferBase > >::operator new().

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

- csutil/pooledscfclass.h