Menu

object::UninitializedStoragePool< T, C, N, callDestructor > Class Template Reference

UninitializedStoragePool is an abstraction of an arbitrary storage structure (supporting a certain interface) with uninitialized data, providing an iterator interface. More...

#include <UninitializedStoragePool.h>

Data Structures

class  Iterator
 Type definition of an iterator. More...

Public Types

typedef T value_type
 Type definition of instatiated type.
typedef T * pointer
 Type definition of pointer to intantiated type.
typedef T & reference
 Type definition of a reference to intantiated type.
typedef Iterator iterator

Public Member Functions

 ~UninitializedStoragePool ()
iterator begin () __attribute__((always_inline))
 Get an iterator which references the first element.
iterator end () __attribute__((always_inline))
 Get an iterator which marks the end of the Array.
void delElement (const pointer v) __attribute__((always_inline))
 Removes the specified element from the storage.
value_typenewElement () __attribute__((always_inline))
 Delivers a new Element.

Detailed Description

template<typename T, template< typename, unsigned int, bool > class C, unsigned int N = 8, bool callDestructor = true>
class object::UninitializedStoragePool< T, C, N, callDestructor >

UninitializedStoragePool is an abstraction of an arbitrary storage structure (supporting a certain interface) with uninitialized data, providing an iterator interface.

It enables using uninitialized storage for objects of the certain type T to allow deferred calls of constructors. Further, it provides a possibility to manage objects without default or assignment constructors, which is impossible with standard container.

Template Parameters:
T is the element type that is stored
C is the underlying storage structure
N is the count of elements that is stored and the default is eight
callDestructor enables switiching between the destruction of all objects residing in the underlying container or doing nothing, in order to safe program space. In embedded environments it is sometimes possible to forbear destruction.

Member Typedef Documentation

template<typename T , template< typename, unsigned int, bool > class C, unsigned int N = 8, bool callDestructor = true>
typedef Iterator object::UninitializedStoragePool< T, C, N, callDestructor >::iterator
template<typename T , template< typename, unsigned int, bool > class C, unsigned int N = 8, bool callDestructor = true>
typedef T* object::UninitializedStoragePool< T, C, N, callDestructor >::pointer

Type definition of pointer to intantiated type.

template<typename T , template< typename, unsigned int, bool > class C, unsigned int N = 8, bool callDestructor = true>
typedef T& object::UninitializedStoragePool< T, C, N, callDestructor >::reference

Type definition of a reference to intantiated type.

template<typename T , template< typename, unsigned int, bool > class C, unsigned int N = 8, bool callDestructor = true>
typedef T object::UninitializedStoragePool< T, C, N, callDestructor >::value_type

Type definition of instatiated type.


Constructor & Destructor Documentation

template<typename T , template< typename, unsigned int, bool > class C, unsigned int N = 8, bool callDestructor = true>
object::UninitializedStoragePool< T, C, N, callDestructor >::~UninitializedStoragePool (  )  [inline]

Member Function Documentation

template<typename T , template< typename, unsigned int, bool > class C, unsigned int N = 8, bool callDestructor = true>
iterator object::UninitializedStoragePool< T, C, N, callDestructor >::begin (  )  [inline]

Get an iterator which references the first element.

Referenced by object::UninitializedStoragePool< T, C, N, callDestructor >::~UninitializedStoragePool().

template<typename T , template< typename, unsigned int, bool > class C, unsigned int N = 8, bool callDestructor = true>
void object::UninitializedStoragePool< T, C, N, callDestructor >::delElement ( const pointer  v  )  [inline]

Removes the specified element from the storage.

Referenced by object::UninitializedStoragePool< T, C, N, callDestructor >::~UninitializedStoragePool().

template<typename T , template< typename, unsigned int, bool > class C, unsigned int N = 8, bool callDestructor = true>
iterator object::UninitializedStoragePool< T, C, N, callDestructor >::end (  )  [inline]

Get an iterator which marks the end of the Array.

Referenced by object::UninitializedStoragePool< T, C, N, callDestructor >::~UninitializedStoragePool().

template<typename T , template< typename, unsigned int, bool > class C, unsigned int N = 8, bool callDestructor = true>
value_type* object::UninitializedStoragePool< T, C, N, callDestructor >::newElement (  )  [inline]

Delivers a new Element.

Returns:
a pointer to an element or Null pointer if there are no free elements

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