Murl::Util::DeepCopy Namespace Reference
Object deep copy functions. More...
Functions | |
template<class DataType > | |
DataType * | PlacementNew (DataType *dstPtr) |
Placement new an object with default constructor. More... | |
template<class DataType > | |
DataType * | PlacementNew (DataType *dstPtr, const DataType &value) |
Placement new and copy construct an object. More... | |
template<class DataType > | |
void | PlacementNewArray (DataType *dstPtr, const DataType *dstEnd) |
Placement new and default construct an array of objects. More... | |
template<class DataType > | |
void | DestructArray (DataType *dstPtr, const DataType *dstEnd) |
Destruct an array of objects. More... | |
template<class DataType > | |
void | PlacementNewCopyArray (DataType *dstPtr, const DataType *srcPtr, const DataType *srcEnd) |
Placement new and copy construct an array of objects. More... | |
template<class DataType > | |
void | PlacementNewFillArray (DataType *dstPtr, const DataType *dstEnd, const DataType &value) |
Placement new and copy construct an array of objects from a single object. More... | |
Detailed Description
Object deep copy functions.
Function Documentation
◆ PlacementNew() [1/2]
template<class DataType >
DataType* Murl::Util::DeepCopy::PlacementNew | ( | DataType * | dstPtr | ) |
Placement new an object with default constructor.
- Parameters
-
dstPtr The destination memory pointer.
- Returns
- The destination memory pointer.
Referenced by Murl::Array< DataType >::Add(), Murl::Queue< DataType >::AddHead(), and Murl::Queue< DataType >::AddTail().
◆ PlacementNew() [2/2]
template<class DataType >
DataType* Murl::Util::DeepCopy::PlacementNew | ( | DataType * | dstPtr, |
const DataType & | value | ||
) |
Placement new and copy construct an object.
- Parameters
-
dstPtr The destination memory pointer. value The object to copy.
- Returns
- The destination memory pointer.
◆ PlacementNewArray()
template<class DataType >
void Murl::Util::DeepCopy::PlacementNewArray | ( | DataType * | dstPtr, |
const DataType * | dstEnd | ||
) |
Placement new and default construct an array of objects.
- Parameters
-
dstPtr The destination memory start pointer. dstEnd The destination memory end pointer.
Referenced by Murl::Array< DataType >::AddN().
◆ DestructArray()
template<class DataType >
void Murl::Util::DeepCopy::DestructArray | ( | DataType * | dstPtr, |
const DataType * | dstEnd | ||
) |
Destruct an array of objects.
- Parameters
-
dstPtr The destination memory start pointer. dstEnd The destination memory end pointer.
◆ PlacementNewCopyArray()
template<class DataType >
void Murl::Util::DeepCopy::PlacementNewCopyArray | ( | DataType * | dstPtr, |
const DataType * | srcPtr, | ||
const DataType * | srcEnd | ||
) |
Placement new and copy construct an array of objects.
Overlapping memory blocks are not supported.
- Parameters
-
dstPtr The destination memory pointer. srcPtr The source memory start pointer. srcEnd The source memory end pointer.
◆ PlacementNewFillArray()
template<class DataType >
void Murl::Util::DeepCopy::PlacementNewFillArray | ( | DataType * | dstPtr, |
const DataType * | dstEnd, | ||
const DataType & | value | ||
) |
Placement new and copy construct an array of objects from a single object.
- Parameters
-
dstPtr The destination memory start pointer. dstEnd The destination memory end pointer. value The object to copy.