CFx SDK Documentation  2023 SP0
Public Types | Public Member Functions | List of all members
OdAllocator< T > Class Template Reference

#include <OdMemory.h>

Inheritance diagram for OdAllocator< T >:

Public Types

typedef std::allocator< T >::size_type size_type
 
typedef std::allocator< T >::difference_type difference_type
 
typedef std::allocator< T >::pointer pointer
 
typedef std::allocator< T >::const_pointer const_pointer
 
typedef std::allocator< T >::reference reference
 
typedef std::allocator< T >::const_reference const_reference
 
typedef std::allocator< T >::value_type value_type
 

Public Member Functions

pointer allocate (size_type N, const void *=0)
 
pointer allocate (size_type N, const_pointer=0)
 DOM For CodeWarrior. More...
 
void deallocate (void *P, size_type=0)
 

Detailed Description

template<class T>
class OdAllocator< T >

This template class extends the functionality of the standard STL class std::allocator for those compilers that not support for construct and destroy.

Remarks
If construct and destroy are supported, as indicated by #define OD_STD_ALLOCATOR, this class is does nothing to std::allocator.

<group Other_Classes>

Definition at line 51 of file OdMemory.h.

Member Typedef Documentation

◆ const_pointer

template<class T >
typedef std::allocator<T>::const_pointer OdAllocator< T >::const_pointer

Definition at line 57 of file OdMemory.h.

◆ const_reference

template<class T >
typedef std::allocator<T>::const_reference OdAllocator< T >::const_reference

Definition at line 59 of file OdMemory.h.

◆ difference_type

template<class T >
typedef std::allocator<T>::difference_type OdAllocator< T >::difference_type

Definition at line 55 of file OdMemory.h.

◆ pointer

template<class T >
typedef std::allocator<T>::pointer OdAllocator< T >::pointer

Definition at line 56 of file OdMemory.h.

◆ reference

template<class T >
typedef std::allocator<T>::reference OdAllocator< T >::reference

Definition at line 58 of file OdMemory.h.

◆ size_type

template<class T >
typedef std::allocator<T>::size_type OdAllocator< T >::size_type

Definition at line 54 of file OdMemory.h.

◆ value_type

template<class T >
typedef std::allocator<T>::value_type OdAllocator< T >::value_type

Definition at line 60 of file OdMemory.h.

Member Function Documentation

◆ allocate() [1/2]

template<class T >
pointer OdAllocator< T >::allocate ( size_type  N,
const void = 0 
)
inline

Allocates a block of memory sufficient to store the specified number of elements.

Parameters
N[in] Number of elements.
Returns
Returns a pointer to the allocated memory.

Definition at line 78 of file OdMemory.h.

◆ allocate() [2/2]

template<class T >
pointer OdAllocator< T >::allocate ( size_type  N,
const_pointer  = 0 
)
inline

DOM For CodeWarrior.

Definition at line 91 of file OdMemory.h.

◆ deallocate()

template<class T >
void OdAllocator< T >::deallocate ( void P,
size_type  = 0 
)
inline

Frees a block of memory allocated with allocate.

Parameters
P[in] Pointer to the memory.

Definition at line 130 of file OdMemory.h.


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