CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | List of all members
OdObjectsAllocator< T > Class Template Reference

#include <OdArray.h>

Inheritance diagram for OdObjectsAllocator< T >:
OdPlainObjectsAllocator< T >

Public Types

typedef unsigned int size_type
 

Static Public Member Functions

static void copyAssignRangeDisjoint (T *pDestination, const T *pSource, size_type numElements)
 
static void copyAssignRange (T *pDestination, const T *pSource, size_type numElements)
 
static void moveAssignRange (T *pDestination, T *pSource, size_type numElements)
 
static void defaultConstruct (T *pElement)
 
static void copyConstruct (T *pElement, const T &value)
 
static void moveConstruct (T *pElement, T &&value)
 
static void copyConstructFill (T *pDestination, size_type numElements, const T &value)
 
static void defaultConstructFill (T *pDestination, size_type numElements)
 
static void copyConstructRange (T *pDestination, const T *pSource, size_type numElements)
 
static void moveConstructRange (T *pDestination, T *pSource, size_type numElements)
 
static void destroy (T *pObject)
 
static void destroyRange (T *objects, size_type numObjects)
 
static bool useRealloc ()
 

Detailed Description

template<class T>
class OdObjectsAllocator< T >

This template class implements object allocation functions within the ODA Platform.

Remarks
This class is for objects that must be copied with the assignment operator. For objects that can be copied with memcpy(), see OdPlainObjectsAllocator.
See also
TD_Db

<group Other_Classes>

Definition at line 415 of file OdArray.h.

Member Typedef Documentation

◆ size_type

template<class T >
typedef unsigned int OdObjectsAllocator< T >::size_type

Definition at line 418 of file OdArray.h.

Member Function Documentation

◆ copyAssignRange()

template<class T >
static void OdObjectsAllocator< T >::copyAssignRange ( T *  pDestination,
const T *  pSource,
size_type  numElements 
)
inlinestatic

This function performs a copy assignment from a source range to a destination range (ranges may overlap).

Parameters
pDestination[in] Pointer to the destination.
pSource[in] Pointer to the source.
numElements[in] Number of elements.
Remarks
If the source and destination regions overlap, the method copies the overlapping region before it is overwritten. Use copyAssignRangeDisjoint() to handle provably non-overlapping regions.

Definition at line 455 of file OdArray.h.

◆ copyAssignRangeDisjoint()

template<class T >
static void OdObjectsAllocator< T >::copyAssignRangeDisjoint ( T *  pDestination,
const T *  pSource,
size_type  numElements 
)
inlinestatic

This function performs a copy assignment from a source range to a destination range (ranges must not overlap).

Parameters
pDestination[in] Pointer to the destination.
pSource[in] Pointer to the source.
numElements[in] Number of elements.
Remarks
If the source and destination regions overlap, the behavior of the function is undefined. Use copyAssignRange() to handle overlapping regions.

Definition at line 431 of file OdArray.h.

◆ copyConstruct()

template<class T >
static void OdObjectsAllocator< T >::copyConstruct ( T *  pElement,
const T &  value 
)
inlinestatic

This function performs a copy constructor on one memory location.

Parameters
pElement[out] Receives the element.
value[in] Value for the element.

Definition at line 530 of file OdArray.h.

◆ copyConstructFill()

template<class T >
static void OdObjectsAllocator< T >::copyConstructFill ( T *  pDestination,
size_type  numElements,
const T &  value 
)
inlinestatic

This function performs a copy constructor on a destination range, copying the same source element.

Parameters
pDestination[in] Pointer to the destination.
numElements[in] Number of elements.
value[in] Value for the elements.

Definition at line 563 of file OdArray.h.

◆ copyConstructRange()

template<class T >
static void OdObjectsAllocator< T >::copyConstructRange ( T *  pDestination,
const T *  pSource,
size_type  numElements 
)
inlinestatic

This function performs a copy constructor from a source range to a destination range.

Parameters
pDestination[in] Pointer to the destination.
pSource[in] Pointer to the source.
numElements[in] Number of elements.

Definition at line 601 of file OdArray.h.

◆ defaultConstruct()

template<class T >
static void OdObjectsAllocator< T >::defaultConstruct ( T *  pElement)
inlinestatic

This function performs a default constructor on one memory location.

Parameters
pElement[out] Receives the element.
Remarks
In some memory allocators, the method performs a value initialization instead of default initialization, i.e., primitive types are zero-initialized instead of being left with undefined values.

Definition at line 515 of file OdArray.h.

◆ defaultConstructFill()

template<class T >
static void OdObjectsAllocator< T >::defaultConstructFill ( T *  pDestination,
size_type  numElements 
)
inlinestatic

This function performs a default constructor on a destination range.

Parameters
pDestination[in] Pointer to the destination.
numElements[in] Number of elements.
Remarks
In some memory allocators, the method performs a value initialization instead of default initialization, i.e., primitive types are zero-initialized instead of being left with undefined values.

Definition at line 584 of file OdArray.h.

◆ destroy()

template<class T >
static void OdObjectsAllocator< T >::destroy ( T *  pObject)
inlinestatic

Calls a destructor for an element at one location.

Parameters
pObject[in] Pointer to the object.

Definition at line 639 of file OdArray.h.

◆ destroyRange()

template<class T >
static void OdObjectsAllocator< T >::destroyRange ( T *  objects,
size_type  numObjects 
)
inlinestatic

Calls a destructor for elements at a destination range.

Parameters
objects[in] Array of objects.
numObjects[in] Number of objects.

Definition at line 652 of file OdArray.h.

◆ moveAssignRange()

template<class T >
static void OdObjectsAllocator< T >::moveAssignRange ( T *  pDestination,
T *  pSource,
size_type  numElements 
)
inlinestatic

This function performs a move assignment from a source range to a destination range (ranges may overlap).

Parameters
pDestination[in] Pointer to the destination.
pSource[in] Pointer to the source.
numElements[in] Number of elements.
Remarks
If the source and destination regions overlap, the method moves the overlapping region before it is overwritten.

Definition at line 483 of file OdArray.h.

◆ moveConstruct()

template<class T >
static void OdObjectsAllocator< T >::moveConstruct ( T *  pElement,
T &&  value 
)
inlinestatic

This function performs a move constructor on one memory location.

Parameters
pElement[out] Receives the element.
value[in] Value for the element.

Definition at line 546 of file OdArray.h.

◆ moveConstructRange()

template<class T >
static void OdObjectsAllocator< T >::moveConstructRange ( T *  pDestination,
T *  pSource,
size_type  numElements 
)
inlinestatic

This function performs a move constructor from a source range to a destination range.

Parameters
pDestination[in] Pointer to the destination.
pSource[in] Pointer to the source.
numElements[in] Number of elements.

Definition at line 621 of file OdArray.h.

◆ useRealloc()

template<class T >
static bool OdObjectsAllocator< T >::useRealloc ( )
inlinestatic

Indicates whether odrxRealloc can be used to resize an array.

Returns
The true value if odrxRealloc can be used to resize an array, or false otherwise.
Remarks
This function always returns false.

Definition at line 670 of file OdArray.h.


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