ADTF  3.18.2
adtf_memory_forward< adtf_util::cMemoryBlock >

specialization for adtf_util::cMemoryBlock More...

Static Public Member Functions

static tResult Assign (adtf_util::cMemoryBlock *pAssignValue, const size_t, const void *pValueToSet, const size_t szSizeToSet)
 Sets (copy) the memory value pValueToSet of size in bytes szSizeToSet to the of container class T in parameter pAssignValue. More...
 
static const void * GetPtr (const adtf_util::cMemoryBlock *pAssignValue)
 Gets the memory pointer to the of container class T in parameter pAssignValue. More...
 
static size_t GetSize (const adtf_util::cMemoryBlock *pAssignValue, const size_t)
 Gets size in bytes of the memory pointer of container class T in parameter pAssignValue. More...
 

Detailed Description

specialization for adtf_util::cMemoryBlock

See also
adtf_memory_forward

Definition at line 23 of file rawmemory_intf.h.

Member Function Documentation

◆ Assign()

static tResult Assign ( adtf_util::cMemoryBlock *  pAssignValue,
const  size_t,
const void *  pValueToSet,
const size_t  szSizeToSet 
)
inlinestatic

Sets (copy) the memory value pValueToSet of size in bytes szSizeToSet to the of container class T in parameter pAssignValue.

Usually this implementation creates a deep copy.

Parameters
[in]pAssignValuepointer to the container class T. Must be a valid constructed object.
[in]szStaticSizeimplementation details: max size of static pre allocated memory within AssignValue. if set no dynamic allocation possible.
[in]pValueToSetraw pointer to the memory to set
[in]szSizeToSetsize in bytes of pValueToSet
Returns
Standard Result Code

Definition at line 27 of file rawmemory_intf.h.

◆ GetPtr()

static const void* GetPtr ( const adtf_util::cMemoryBlock *  pAssignValue)
inlinestatic

Gets the memory pointer to the of container class T in parameter pAssignValue.

Parameters
[in]pAssignValuepointer to the container class T. Must be a valid constructed object.
Returns
valid raw memory pointer to the mamory with pAssignValue.
Remarks
Make sure the pointer is still valid after function returned.

Definition at line 35 of file rawmemory_intf.h.

◆ GetSize()

static size_t GetSize ( const adtf_util::cMemoryBlock *  pAssignValue,
const  size_t 
)
inlinestatic

Gets size in bytes of the memory pointer of container class T in parameter pAssignValue.

Parameters
[in]pAssignValuepointer to the container class T. Must be a valid constructed object.
[in]szStaticSizesize of the pointers buffer if container class is a static sized type
Returns
the size in bytes.

Definition at line 40 of file rawmemory_intf.h.