ADTF
Loading...
Searching...
No Matches
adtf::base::adtf_memory< T, TSIZE, Enable > Class Template Reference

bring latest ant::adtf_memory to users scope More...

#include <rawmemory_base.h>

Inherits adtf::base::ant::IRawMemory, and adtf::base::ant::adtf_memory_forward< T >.

Public Member Functions

 adtf_memory (T *pAssignValue)
 explicit CTOR to create a IRawMemory interface rvalue
 
virtual ~adtf_memory ()
 DTOR.
 
tResult Set (const void *pValue, size_t szSize) override
 Sets the content of the assigned value of type T to the given memory.
 
const void * Get () const override
 Retrieves the content of the assigned value of type T as memory pointer.
 
size_t GetSize () const override
 Retrieves the size of the content of the assigned value of type T.
 

Additional Inherited Members

- Static Protected Member Functions inherited from adtf::base::ant::adtf_memory_forward< T >
static tResult Assign (T *pAssignValue, const size_t szStaticSize, const void *pValueToSet, const size_t szSizeToSet)
 
static const void * GetPtr (const T *pAssignValue)
 
static size_t GetSize (const T *pAssignValue, const size_t szStaticSize)
 

Detailed Description

template<typename T, size_t TSIZE = 0, typename Enable = void>
class adtf::base::adtf_memory< T, TSIZE, Enable >

bring latest ant::adtf_memory to users scope

Template class implementation for the ant::IRawMemory interface. The template uses the ant::adtf_memory_forward concept template for concrete Assign, GetPtr and GeSize implementations.

The IRawMemory interface is designed to exists only on stack as rvalue reference.

Template Parameters
TType of the memory implementation which can provide raw memory.
size_tSize of memory if the type T is a fixed size type. Set to 0 if T is resizable and a non trivial type.
EnableEnabled if is trivially copyable layout type
Remarks
If no specialization for adtf_memory_forward exists for your type T the using of adtf_memory and adtf_memory_intf will fail!

Constructor & Destructor Documentation

◆ adtf_memory()

template<typename T, size_t TSIZE = 0, typename Enable = void>
adtf::base::penguin::adtf_memory< T, TSIZE, Enable >::adtf_memory ( T * pAssignValue)
inlineexplicit

explicit CTOR to create a IRawMemory interface rvalue

Parameters
pAssignValuethe value pointer to assign

Member Function Documentation

◆ Get()

template<typename T, size_t TSIZE = 0, typename Enable = void>
const void * adtf::base::penguin::adtf_memory< T, TSIZE, Enable >::Get ( ) const
inlineoverridevirtual

Retrieves the content of the assigned value of type T as memory pointer.

Returns
const void*

Implements adtf::base::ant::IRawMemory.

◆ GetSize()

template<typename T, size_t TSIZE = 0, typename Enable = void>
size_t adtf::base::penguin::adtf_memory< T, TSIZE, Enable >::GetSize ( ) const
inlineoverridevirtual

Retrieves the size of the content of the assigned value of type T.

Remarks
This value is directly related to the returned memory pointer of Get
Returns
size_t

Implements adtf::base::ant::IRawMemory.

◆ Set()

template<typename T, size_t TSIZE = 0, typename Enable = void>
tResult adtf::base::penguin::adtf_memory< T, TSIZE, Enable >::Set ( const void * pValue,
size_t szSize )
inlineoverridevirtual

Sets the content of the assigned value of type T to the given memory.

Parameters
pValueThe memory to set the value
szSizethe size of memory within pValue in bytes
Returns
tResult

Implements adtf::base::ant::IRawMemory.


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