Lumiera  0.pre.03
»edit your freedom«
SimpleAllocator< TYPES, COUNTER > Class Template Reference

#include "lib/simple-allocator.hpp"

Description

template<typename TYPES, class COUNTER = NoInstantiationCount>
class lib::SimpleAllocator< TYPES, COUNTER >

Frontend for explicit allocations, using a custom allocator.

This template is to be instantiated for the collection of types later to be allocated through this custom memory manager/model. It provides convenience shortcuts for placement-construction and releasing of target objects.

Todo:
currently (as of 8/09) the low-level pooled allocator isn't implemented; instead we do just heap allocations. ////////////////////////////////////////////////////////////////////////////////////////////Ticket #835

Definition at line 136 of file simple-allocator.hpp.

Public Member Functions

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

Private Member Functions

template<class XX >
void ___assertSupportedType ()
 
template<class XX >
XX * allocateSlot ()
 forward plain memory allocation
 
template<class XX >
void releaseSlot (XX *entry)
 

Member Function Documentation

◆ create() [1/5]

XX* create ( P1 &  p1)
inline
Parameters
p1invoke 1-arg ctor

Definition at line 203 of file simple-allocator.hpp.

◆ create() [2/5]

XX* create ( P1 &  p1,
P2 &  p2 
)
inline
Parameters
p2invoke 2-arg ctor

Definition at line 214 of file simple-allocator.hpp.

◆ create() [3/5]

XX* create ( P1 &  p1,
P2 &  p2,
P3 &  p3 
)
inline
Parameters
p3invoke 3-arg ctor

Definition at line 226 of file simple-allocator.hpp.

◆ create() [4/5]

XX* create ( P1 &  p1,
P2 &  p2,
P3 &  p3,
P4 &  p4 
)
inline
Parameters
p4invoke 4-arg ctor

Definition at line 239 of file simple-allocator.hpp.

◆ create() [5/5]

XX* create ( P1 &  p1,
P2 &  p2,
P3 &  p3,
P4 &  p4,
P5 &  p5 
)
inline
Parameters
p5invoke 5-arg ctor

Definition at line 253 of file simple-allocator.hpp.

+ Inheritance diagram for SimpleAllocator< TYPES, COUNTER >:
+ Collaboration diagram for SimpleAllocator< TYPES, COUNTER >:

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