lib::TypedAllocationManager Class Reference

#include <typed-allocation-manager.hpp>

Collaboration diagram for lib::TypedAllocationManager:

Collaboration graph
[legend]

List of all members.


Detailed Description

Foundation for a custom allocation manager, tracking the created objects by smart-ptrs.

The public interface provides forwarding functions to invoke the ctor of the objects to be created, thereby placing them into the storage maintained by a low-level allocator or pooled storage manager. The created smart-ptr owns the new object and is wired internally to releaseSlot. Subclasses may also directly allocate and de-allocate such a (typed) storage slot.

Definition at line 102 of file typed-allocation-manager.hpp.


Public Member Functions

template<class XX, typename P1, typename P2, typename P3, typename P4, typename P5>
shared_ptr< XX > create (P1 &p1, P2 &p2, P3 &p3, P4 &p4, P5 &p5)
template<class XX, typename P1, typename P2, typename P3, typename P4>
shared_ptr< XX > create (P1 &p1, P2 &p2, P3 &p3, P4 &p4)
template<class XX, typename P1, typename P2, typename P3>
shared_ptr< XX > create (P1 &p1, P2 &p2, P3 &p3)
template<class XX, typename P1, typename P2>
shared_ptr< XX > create (P1 &p1, P2 &p2)
template<class XX, typename P1>
shared_ptr< XX > create (P1 &p1)
template<class XX>
shared_ptr< XX > create ()
template<class XX>
size_t numSlots () const

Protected Member Functions

template<class XX>
Slot< XX > allocateSlot ()
template<class XX>
void destroyElement (XX *entry)
template<class XX>
void releaseSlot (void *entry)

Private Types

typedef TypedAllocationManager _TheManager

Private Attributes

lib::TypedCounter allocCnt_

Friends

class Killer
 especially all Killers are entitled to desroyElement()

Classes

class  Killer
 opaque link to the manager, to be used by handles and smart-ptrs to trigger preconfigured destruction. More...
struct  Slot
 a token representing a newly opened slot capable for holding an object of type XOX . More...

Member Function Documentation

template<class XX, typename P1, typename P2, typename P3, typename P4, typename P5>
shared_ptr<XX> lib::TypedAllocationManager::create ( P1 &  p1,
P2 &  p2,
P3 &  p3,
P4 &  p4,
P5 &  p5 
) [inline]

Parameters:
p5  invoke 5-arg ctor

Definition at line 252 of file typed-allocation-manager.hpp.

template<class XX, typename P1, typename P2, typename P3, typename P4>
shared_ptr<XX> lib::TypedAllocationManager::create ( P1 &  p1,
P2 &  p2,
P3 &  p3,
P4 &  p4 
) [inline]

Parameters:
p4  invoke 4-arg ctor

Definition at line 238 of file typed-allocation-manager.hpp.

template<class XX, typename P1, typename P2, typename P3>
shared_ptr<XX> lib::TypedAllocationManager::create ( P1 &  p1,
P2 &  p2,
P3 &  p3 
) [inline]

Parameters:
p3  invoke 3-arg ctor

Definition at line 225 of file typed-allocation-manager.hpp.

template<class XX, typename P1, typename P2>
shared_ptr<XX> lib::TypedAllocationManager::create ( P1 &  p1,
P2 &  p2 
) [inline]

Parameters:
p2  invoke 2-arg ctor

Definition at line 213 of file typed-allocation-manager.hpp.

template<class XX, typename P1>
shared_ptr<XX> lib::TypedAllocationManager::create ( P1 &  p1  )  [inline]

Parameters:
p1  invoke 1-arg ctor

Definition at line 202 of file typed-allocation-manager.hpp.


Friends And Related Function Documentation

friend class Killer [friend]

especially all Killers are entitled to desroyElement()

Definition at line 307 of file typed-allocation-manager.hpp.


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

Generated on Sun Aug 1 21:33:02 2010 for Lumiera by  doxygen 1.5.6