ReactOS 0.4.15-dev-8145-ga541a46
EH_allocator< _Tp > Class Template Reference

#include <Prefix.h>

Public Types

typedef _Tp value_type
 
typedef value_typepointer
 
typedef const _Tp * const_pointer
 
typedef _Tp & reference
 
typedef const _Tp & const_reference
 
typedef EH_CSTD::size_t size_type
 
typedef EH_CSTD::ptrdiff_t difference_type
 

Public Member Functions

 EH_allocator () _STLP_NOTHROW
 
 EH_allocator (const EH_allocator< _Tp > &) _STLP_NOTHROW
 
 ~EH_allocator () _STLP_NOTHROW
 
pointer address (reference __x)
 
const_pointer address (const_reference __x) const
 
_Tp * allocate (size_type __n, const void *=0) const
 
void deallocate (pointer __p, size_type __n) const
 
void deallocate (pointer __p) const
 
size_type max_size () const _STLP_NOTHROW
 
void construct (pointer __p, const _Tp &__val) const
 
void destroy (pointer __p) const
 

Detailed Description

template<class _Tp>
class EH_allocator< _Tp >

Definition at line 121 of file Prefix.h.

Member Typedef Documentation

◆ const_pointer

template<class _Tp >
typedef const _Tp* EH_allocator< _Tp >::const_pointer

Definition at line 126 of file Prefix.h.

◆ const_reference

template<class _Tp >
typedef const _Tp& EH_allocator< _Tp >::const_reference

Definition at line 128 of file Prefix.h.

◆ difference_type

template<class _Tp >
typedef EH_CSTD::ptrdiff_t EH_allocator< _Tp >::difference_type

Definition at line 130 of file Prefix.h.

◆ pointer

template<class _Tp >
typedef value_type* EH_allocator< _Tp >::pointer

Definition at line 125 of file Prefix.h.

◆ reference

template<class _Tp >
typedef _Tp& EH_allocator< _Tp >::reference

Definition at line 127 of file Prefix.h.

◆ size_type

template<class _Tp >
typedef EH_CSTD::size_t EH_allocator< _Tp >::size_type

Definition at line 129 of file Prefix.h.

◆ value_type

template<class _Tp >
typedef _Tp EH_allocator< _Tp >::value_type

Definition at line 124 of file Prefix.h.

Constructor & Destructor Documentation

◆ EH_allocator() [1/2]

template<class _Tp >
EH_allocator< _Tp >::EH_allocator ( )
inline

Definition at line 136 of file Prefix.h.

136{}

◆ EH_allocator() [2/2]

template<class _Tp >
EH_allocator< _Tp >::EH_allocator ( const EH_allocator< _Tp > &  )
inline

Definition at line 140 of file Prefix.h.

140{}

◆ ~EH_allocator()

template<class _Tp >
EH_allocator< _Tp >::~EH_allocator ( )
inline

Definition at line 141 of file Prefix.h.

141{}

Member Function Documentation

◆ address() [1/2]

template<class _Tp >
const_pointer EH_allocator< _Tp >::address ( const_reference  __x) const
inline

Definition at line 143 of file Prefix.h.

143{ return &__x; }

◆ address() [2/2]

template<class _Tp >
pointer EH_allocator< _Tp >::address ( reference  __x)
inline

Definition at line 142 of file Prefix.h.

142{ return &__x; }

◆ allocate()

template<class _Tp >
_Tp * EH_allocator< _Tp >::allocate ( size_type  __n,
const void = 0 
) const
inline

Definition at line 145 of file Prefix.h.

145 {
146 return __n != 0 ? __REINTERPRET_CAST(value_type*,EH_STD::__new_alloc::allocate(__n * sizeof(value_type))) : 0;
147 }
return __n
Definition: _algo.h:75
_Tp value_type
Definition: Prefix.h:124
#define __REINTERPRET_CAST(__x, __y)
Definition: features.h:586

◆ construct()

template<class _Tp >
void EH_allocator< _Tp >::construct ( pointer  __p,
const _Tp &  __val 
) const
inline

Definition at line 156 of file Prefix.h.

156{ stlport::construct(__p, __val); }
_STLP_INLINE_LOOP _InputIter const _Tp & __val
Definition: _algobase.h:656

◆ deallocate() [1/2]

template<class _Tp >
void EH_allocator< _Tp >::deallocate ( pointer  __p) const
inline

Definition at line 154 of file Prefix.h.

154{ if (__p != 0) EH_STD::__new_alloc::deallocate((void*)__p, sizeof(value_type)); }

◆ deallocate() [2/2]

template<class _Tp >
void EH_allocator< _Tp >::deallocate ( pointer  __p,
size_type  __n 
) const
inline

Definition at line 149 of file Prefix.h.

149 {
150 _STLP_ASSERT( (__p == 0) == (__n == 0) )
151 if (__p != 0) EH_STD::__new_alloc::deallocate((void*)__p, __n * sizeof(value_type));
152 }
#define _STLP_ASSERT(expr)
Definition: _debug.h:165
void deallocate(pointer __p, size_type __n) const
Definition: Prefix.h:149
if(dx< 0)
Definition: linetemp.h:194
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList

◆ destroy()

template<class _Tp >
void EH_allocator< _Tp >::destroy ( pointer  __p) const
inline

Definition at line 157 of file Prefix.h.

157{ stlport::destroy(__p); }

◆ max_size()

template<class _Tp >
size_type EH_allocator< _Tp >::max_size ( ) const
inline

Definition at line 155 of file Prefix.h.

155{ return size_t(-1) / sizeof(value_type); }
__kernel_size_t size_t
Definition: linux.h:237

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