ADTF
3.18.2
|
Template class implementation for the IRawMemory interface for trivial types. More...
Public Member Functions | |
adtf_memory_trivial_type (T *pValuePointer) | |
tResult | Set (const void *pValue, size_t szSize) override |
Sets the Raw pointer memory. More... | |
size_t | GetSize () const override |
Returns the size in bytes of the memory. More... | |
const void * | Get () const override |
Returns the raw memory pointer. More... | |
Private Attributes | |
T * | m_pAssignedValue = nullptr |
Template class implementation for the IRawMemory interface for trivial types.
If the given type T
is const
the IRawMemory::Set call will fail! The IRawMemory interface is designed to exists only on stack as rvalue reference.
See Supported types for adtf_memory<T> for writing and reading Samples for supported trivial types
T | the Type of the memory implementation which can provide raw memory. |
Enable | Enabled if is a const layout type. |
uint8_t*
since this type is trivial, too. So do not use it with pointers! Definition at line 292 of file rawmemory_base.h.
|
inlineoverridevirtual |
Returns the raw memory pointer.
Implements IRawMemory.
Definition at line 337 of file rawmemory_base.h.
|
inlineoverridevirtual |
Returns the size in bytes of the memory.
Implements IRawMemory.
Definition at line 325 of file rawmemory_base.h.
|
inlineoverridevirtual |
Sets the Raw pointer memory.
Copy the content.
[in] | pValue | raw memory pointer. |
[in] | szSize | size of memory to copy in bytes. |
ERR_MEMORY | The Memory does not fit. |
ERR_POINTER | Internal implementation error. |
Implements IRawMemory.
Definition at line 307 of file rawmemory_base.h.
References RETURN_ERROR, RETURN_IF_POINTER_NULL, and RETURN_NOERROR.