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

ShmAllocator::Allocator< T > Class Template Reference

#include <ShmAllocator.h>

List of all members.

Public Types

typedef size_t size_type
typedef ptrdiff_t difference_type
typedef T * pointer
typedef const T * const_pointer
typedef T & reference
typedef const T & const_reference
typedef T value_type

Public Member Functions

 Allocator ()
 Allocator (const Allocator &)
template<typename T1>  Allocator (const Allocator< T1 > &)
 ~Allocator ()
pointer address (reference x) const
const_pointer address (const_reference x) const
pointer allocate (size_type n, const void *=0)
void deallocate (pointer p, size_type n)
size_type max_size () const
void construct (pointer p, const T &val)
void destroy (pointer p)


Detailed Description

template<typename T>
class ShmAllocator::Allocator< T >

The actual STL allocator class.

Author:
Nir Shahaf
Version:
0.1


Member Typedef Documentation

template<typename T>
typedef const T* ShmAllocator::Allocator< T >::const_pointer
 

Const object pointer type

template<typename T>
typedef const T& ShmAllocator::Allocator< T >::const_reference
 

Const object reference type

template<typename T>
typedef ptrdiff_t ShmAllocator::Allocator< T >::difference_type
 

Difference type

template<typename T>
typedef T* ShmAllocator::Allocator< T >::pointer
 

Object pointer type

template<typename T>
typedef T& ShmAllocator::Allocator< T >::reference
 

Object reference type

template<typename T>
typedef size_t ShmAllocator::Allocator< T >::size_type
 

Object size type

template<typename T>
typedef T ShmAllocator::Allocator< T >::value_type
 

Object type


Constructor & Destructor Documentation

template<typename T>
ShmAllocator::Allocator< T >::Allocator  ) 
 

Empty conructor.

template<typename T>
ShmAllocator::Allocator< T >::Allocator const Allocator< T > &   ) 
 

Copy constructor.

Parameters:
MyAlloc Another allocator.

template<typename T>
template<typename T1>
ShmAllocator::Allocator< T >::Allocator const Allocator< T1 > &   ) 
 

Copy constructor.

Parameters:
T1 Allocator type.

template<typename T>
ShmAllocator::Allocator< T >::~Allocator  ) 
 

Destructor.


Member Function Documentation

template<typename T>
const_pointer ShmAllocator::Allocator< T >::address const_reference  x  )  const
 

Gets const address.

Parameters:
x Object reference.
Returns:
Const address of object.

template<typename T>
pointer ShmAllocator::Allocator< T >::address reference  x  )  const
 

Gets address.

Parameters:
x Object reference.
Returns:
Address of object.

template<typename T>
pointer ShmAllocator::Allocator< T >::allocate size_type  n,
const void *  = 0
 

Allocates new space.

Parameters:
n Number of objects to allocate space for.
Returns:
Pointer to allocated space.

template<typename T>
void ShmAllocator::Allocator< T >::construct pointer  p,
const T &  val
 

Constructs a new object on a certain memory address (using copy constructor).

Parameters:
p The address.
val The value to use for the copy contructor.

template<typename T>
void ShmAllocator::Allocator< T >::deallocate pointer  p,
size_type  n
 

Returns memory.

Parameters:
p Pointer to free.
n Unused (must not be 0)

template<typename T>
void ShmAllocator::Allocator< T >::destroy pointer  p  ) 
 

Destorys an object without freeing memory.

Parameters:
p The object address.

template<typename T>
size_type ShmAllocator::Allocator< T >::max_size  )  const
 

Gets maximal logical size.

Returns:
The size.


The documentation for this class was generated from the following file:
Generated on Thu Jan 27 10:06:44 2005 for ShmAllocator by doxygen 1.3.6