ADTF
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
adtf_memory< T, TSIZE >

Legacy template class for adtf_memory usage. More...

#include <rawmemory_base.h>

Inheritance diagram for adtf_memory< T, TSIZE >:
[legend]

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)
 Sets the Raw pointer memory.
 
const void * Get () const
 Returns the raw memory pointer.
 
size_t GetSize () const
 Returns the size in bytes of the memory.
 

Private Types

typedef adtf_memory< T, TSIZE > _myType
 
typedef T _myStorageType
 
typedef adtf_memory_forward< T > _myBase
 

Private Member Functions

 adtf_memory (const adtf_memory &)=delete
 
adtf_memoryoperator= (const adtf_memory &)=delete
 
 adtf_memory (adtf_memory &&)=delete
 
adtf_memoryoperator= (adtf_memory &&)=delete
 

Private Attributes

T * m_pAssignValue
 Reference pointer to the T constructed with explict adtf_memory.
 

Additional Inherited Members

- Static Protected Member Functions inherited from adtf_memory_forward< T >
static tResult Assign (T *pAssignValue, const size_t szStaticSize, 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.
 
static const void * GetPtr (const T *pAssignValue)
 Gets the memory pointer to the of container class T in parameter pAssignValue.
 
static size_t GetSize (const T *pAssignValue, const size_t szStaticSize)
 Gets size in bytes of the memory pointer of container class T in parameter pAssignValue.
 

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_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.

Definition at line 150 of file rawmemory_base.h.

Member Typedef Documentation

◆ _myBase

template<typename T, size_t TSIZE = 0>
typedef adtf_memory_forward<T> _myBase
private

Definition at line 154 of file rawmemory_base.h.

◆ _myStorageType

template<typename T, size_t TSIZE = 0>
typedef T _myStorageType
private

Definition at line 153 of file rawmemory_base.h.

◆ _myType

template<typename T, size_t TSIZE = 0>
typedef adtf_memory<T, TSIZE> _myType
private

Definition at line 152 of file rawmemory_base.h.

Constructor & Destructor Documentation

◆ adtf_memory() [1/2]

template<typename T, size_t TSIZE = 0>
adtf_memory ( )
inlineprivate

Definition at line 159 of file rawmemory_base.h.

◆ adtf_memory() [2/2]

template<typename T, size_t TSIZE = 0>
adtf_memory ( T * pAssignValue)
inlineexplicit

explicit CTOR to create a IRawMemory interface rvalue

Definition at line 167 of file rawmemory_base.h.

◆ ~adtf_memory()

template<typename T, size_t TSIZE = 0>
virtual ~adtf_memory ( )
inlinevirtual

DTOR.

Definition at line 172 of file rawmemory_base.h.

Member Function Documentation

◆ Get()

template<typename T, size_t TSIZE = 0>
const void * Get ( ) const
inlinevirtual

Returns the raw memory pointer.

Returns
the pointer to the raw memory.

Implements IRawMemory.

Definition at line 188 of file rawmemory_base.h.

◆ GetSize()

template<typename T, size_t TSIZE = 0>
size_t GetSize ( ) const
inlinevirtual

Returns the size in bytes of the memory.

Returns
The size in bytes.

Implements IRawMemory.

Definition at line 196 of file rawmemory_base.h.

◆ Set()

template<typename T, size_t TSIZE = 0>
tResult 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 IRawMemory.

Definition at line 177 of file rawmemory_base.h.

Member Data Documentation

◆ m_pAssignValue

template<typename T, size_t TSIZE = 0>
T* m_pAssignValue
private

Reference pointer to the T constructed with explict adtf_memory.

Definition at line 158 of file rawmemory_base.h.