Share::Allocator< T > Class Template Reference
[Core library classes]

STL allocator. More...

#include <sharelib.h>

List of all members.

Public Types

typedef T value_type
typedef size_t size_type
typedef ptrdiff_t difference_type
typedef RelocPtr< T > pointer
 Using relocable pointer type.
typedef RelocPtr< const T > const_pointer
 Using relocable pointer type.
typedef T & reference
typedef const T & const_reference

Public Member Functions

 Allocator () throw ()
 ~Allocator () throw ()
template<class U>
 Allocator (const Allocator< U > &) throw ()
pointer address (reference obj) const
const_pointer address (const_reference obj) const
pointer allocate (size_type count)
void deallocate (pointer addr, size_type count)
void construct (pointer p, const T &val)
void destroy (pointer p)
size_type max_size () const throw ()

Classes

struct  rebind
 STL allocator type adapter template. More...


Detailed Description

template<class T>
class Share::Allocator< T >

STL allocator.

Equivalent to std::allocator using ShareManager to define storage.

Bug:
This allocator is known not to work with usual implementations of STL.

Definition at line 623 of file sharelib.h.


Member Typedef Documentation

template<class T>
typedef T Share::Allocator< T >::value_type

Definition at line 625 of file sharelib.h.

template<class T>
typedef size_t Share::Allocator< T >::size_type

Definition at line 626 of file sharelib.h.

template<class T>
typedef ptrdiff_t Share::Allocator< T >::difference_type

Definition at line 627 of file sharelib.h.

template<class T>
typedef RelocPtr<T> Share::Allocator< T >::pointer

Using relocable pointer type.

Definition at line 628 of file sharelib.h.

template<class T>
typedef RelocPtr<const T> Share::Allocator< T >::const_pointer

Using relocable pointer type.

Definition at line 629 of file sharelib.h.

template<class T>
typedef T& Share::Allocator< T >::reference

Definition at line 630 of file sharelib.h.

template<class T>
typedef const T& Share::Allocator< T >::const_reference

Definition at line 631 of file sharelib.h.


Constructor & Destructor Documentation

template<class T>
Share::Allocator< T >::Allocator (  )  throw () [inline]

Note:
Not used for now

Definition at line 636 of file sharelib.h.

template<class T>
Share::Allocator< T >::~Allocator (  )  throw () [inline]

Note:
Not used for now

Definition at line 641 of file sharelib.h.

template<class T>
template<class U>
Share::Allocator< T >::Allocator ( const Allocator< U > &   )  throw () [inline]

Copy constructor

Definition at line 646 of file sharelib.h.


Member Function Documentation

template<class T>
pointer Share::Allocator< T >::address ( reference  obj  )  const [inline]

Parameters:
obj Reference to object
Returns:
Return pointer to object

Definition at line 661 of file sharelib.h.

template<class T>
const_pointer Share::Allocator< T >::address ( const_reference  obj  )  const [inline]

Parameters:
obj Reference to const object
Returns:
Return pointer to const object

Definition at line 669 of file sharelib.h.

template<class T>
pointer Share::Allocator< T >::allocate ( size_type  count  )  [inline]

Allocate array of object

Parameters:
count Count of object to allocate
Returns:
Return pointer to allocated array

Definition at line 678 of file sharelib.h.

References Share::ShareManager::instance().

template<class T>
void Share::Allocator< T >::deallocate ( pointer  addr,
size_type  count 
) [inline]

Deallocate array of object

Parameters:
addr Pointer to array to deallocate
count Count of object to deallocate
Note:
Parameter count is not used by default implementation

Definition at line 688 of file sharelib.h.

References Share::ShareManager::instance().

template<class T>
void Share::Allocator< T >::construct ( pointer  p,
const T &  val 
) [inline]

Definition at line 692 of file sharelib.h.

template<class T>
void Share::Allocator< T >::destroy ( pointer  p  )  [inline]

Definition at line 696 of file sharelib.h.

template<class T>
size_type Share::Allocator< T >::max_size (  )  const throw () [inline]

Definition at line 700 of file sharelib.h.

References Share::ShareManager::instance().


The documentation for this class was generated from the following file:
Generated on Sun Aug 26 17:43:03 2007 for ShareLibrary by  doxygen 1.5.2