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)
inline

Placement new an object with default constructor.

Parameters
dstPtrThe destination memory pointer.
Returns
The destination memory pointer.

Referenced by Murl::Array< EvaluatorFunction *>::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 
)
inline

Placement new and copy construct an object.

Parameters
dstPtrThe destination memory pointer.
valueThe object to copy.
Returns
The destination memory pointer.

◆ PlacementNewArray()

template<class DataType >
void Murl::Util::DeepCopy::PlacementNewArray ( DataType *  dstPtr,
const DataType *  dstEnd 
)
inline

Placement new and default construct an array of objects.

Parameters
dstPtrThe destination memory start pointer.
dstEndThe destination memory end pointer.

Referenced by Murl::Array< EvaluatorFunction *>::AddN(), Murl::Array< EvaluatorFunction *>::InsertN(), and Murl::Array< EvaluatorFunction *>::SetCount().

◆ DestructArray()

template<class DataType >
void Murl::Util::DeepCopy::DestructArray ( DataType *  dstPtr,
const DataType *  dstEnd 
)
inline

◆ PlacementNewCopyArray()

template<class DataType >
void Murl::Util::DeepCopy::PlacementNewCopyArray ( DataType *  dstPtr,
const DataType *  srcPtr,
const DataType *  srcEnd 
)
inline

Placement new and copy construct an array of objects.

Overlapping memory blocks are not supported.

Parameters
dstPtrThe destination memory pointer.
srcPtrThe source memory start pointer.
srcEndThe source memory end pointer.

Referenced by Murl::Queue< DataType *>::GetIter(), Murl::Array< EvaluatorFunction *>::GetIter(), and Murl::Array< EvaluatorFunction *>::Insert().

◆ PlacementNewFillArray()

template<class DataType >
void Murl::Util::DeepCopy::PlacementNewFillArray ( DataType *  dstPtr,
const DataType *  dstEnd,
const DataType &  value 
)
inline

Placement new and copy construct an array of objects from a single object.

Parameters
dstPtrThe destination memory start pointer.
dstEndThe destination memory end pointer.
valueThe object to copy.

Referenced by Murl::Array< EvaluatorFunction *>::Insert(), Murl::Array< EvaluatorFunction *>::SetCount(), and Murl::Array< EvaluatorFunction *>::SetCountAndReserve().


Copyright © 2011-2018 Spraylight GmbH.