CFx SDK Documentation  2022 SP0
Public Types | Static Public Member Functions | List of all members
OdPlainObjectsAllocator< T > Class Template Reference

#include <OdArray.h>

Public Types

typedef unsigned int size_type
 

Static Public Member Functions

static void copy (T *pDestination, const T *pSource, size_type numObjects)
 
static void move (T *pDestination, const T *pSource, size_type numObjects)
 
static void construct (T *pObject)
 
static void construct (T *pObject, const T &value)
 
static void constructn (T *pDestination, size_type numObjects, const T &value)
 
static void constructn (T *pDestination, size_type numObjects)
 
static void constructn (T *pDestination, const T *pSource, size_type numObjects)
 
static void destroy (T *pObject)
 
static void destroy (T *objects, size_type numObjects)
 
static bool useRealloc ()
 

Detailed Description

template<class T>
class OdPlainObjectsAllocator< T >

This template class implements object allocation functions for objects within Teigha.

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

<group Other_Classes>

Definition at line 392 of file OdArray.h.

Member Typedef Documentation

◆ size_type

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

Definition at line 395 of file OdArray.h.

Member Function Documentation

◆ construct() [1/2]

template<class T >
static void OdPlainObjectsAllocator< T >::construct ( T *  pObject)
inlinestatic

This function constructs an object.

Parameters
pObject[out] Receives the object.

Definition at line 441 of file OdArray.h.

◆ construct() [2/2]

template<class T >
static void OdPlainObjectsAllocator< T >::construct ( T *  pObject,
const T &  value 
)
inlinestatic

This function constructs an object.

Parameters
pObject[out] Receives the object.
value[in] Value for the object.

Definition at line 455 of file OdArray.h.

◆ constructn() [1/3]

template<class T >
static void OdPlainObjectsAllocator< T >::constructn ( T *  pDestination,
const T *  pSource,
size_type  numObjects 
)
inlinestatic

This function constructs an array of objects.

Parameters
pDestination[in] Pointer to the destination.
pSource[in] Pointer to the source.
numObjects[in] Number of objects.

Definition at line 504 of file OdArray.h.

◆ constructn() [2/3]

template<class T >
static void OdPlainObjectsAllocator< T >::constructn ( T *  pDestination,
size_type  numObjects 
)
inlinestatic

This function constructs an array of objects.

Parameters
pDestination[in] Pointer to the destination.
numObjects[in] Number of objects.

Definition at line 488 of file OdArray.h.

◆ constructn() [3/3]

template<class T >
static void OdPlainObjectsAllocator< T >::constructn ( T *  pDestination,
size_type  numObjects,
const T &  value 
)
inlinestatic

This function constructs an array of objects.

Parameters
pDestination[in] Pointer to the destination.
numObjects[in] Number of objects.
value[in] Value for the objects.

Definition at line 472 of file OdArray.h.

◆ copy()

template<class T >
static void OdPlainObjectsAllocator< T >::copy ( T *  pDestination,
const T *  pSource,
size_type  numObjects 
)
inlinestatic

This function copies the specified number of objects from source to destination.

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

Definition at line 407 of file OdArray.h.

◆ destroy() [1/2]

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

Destroys the specified objects.

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

Definition at line 534 of file OdArray.h.

◆ destroy() [2/2]

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

Destroys the specified object.

Parameters
pObject[in] Pointer to the object.

Definition at line 522 of file OdArray.h.

◆ move()

template<class T >
static void OdPlainObjectsAllocator< T >::move ( T *  pDestination,
const T *  pSource,
size_type  numObjects 
)
inlinestatic

This function copies the specified number of objects from source to destination.

Parameters
pDestination[in] Pointer to the destination.
pSource[in] Pointer to the source.
numObjects[in] Number of objects.
Remarks
If the source and destination regions overlap, move copies the overlapping region before it is overwritten.
Use copy() to handle non-overlapping regions.

Definition at line 428 of file OdArray.h.

◆ useRealloc()

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

Returns true if and only if odrxRealloc can be used to resize an array.

Remarks
This function always returns true.

Definition at line 549 of file OdArray.h.


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