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

#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)
 
const void * Get () const
 
size_t GetSize () const
 

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>
class adtf::base::ant::adtf_memory< T, TSIZE >

Legacy template class for adtf_memory usage. See adtf::base::penguin::adtf_memory.

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 standard type.

Member Function Documentation

◆ Get()

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

Returns the raw memory pointer.

Returns
the pointer to the raw memory.

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

◆ GetSize()

template<typename T, size_t TSIZE = 0>
size_t adtf::base::ant::adtf_memory< T, TSIZE >::GetSize ( ) const
inlinevirtual

Returns the size in bytes of the memory.

Returns
The size in bytes.

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

◆ Set()

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

Sets the Raw pointer memory. Copy the content.

Parameters
[in]pValueraw memory pointer.
[in]szSizesize of memory to copy in bytes.
Returns
Standard Result Code.
Return values
ERR_MEMORYThe Memory does not fit.
ERR_POINTERInternal implementation error.

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


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