ADTF  3.18.2
adtf_string_forward< T >

Implementation concept template for user defined adtf_string type support (see Supported types for adtf_string<T> for writing and reading strings via interface IString). More...

Inheritance diagram for adtf_string_forward< T >:
[legend]

Static Public Member Functions

static const char * GetConstChar (const T *const pValue)
 Retrieves a const char pointer (null-terminated). More...
 
static size_t GetCurrentLength (const T *const pValue)
 Retrieves the string size of the given pValue. More...
 
static tResult SetValue (T *const pValue, const char *strValue)
 Sets the given strValue to the string type implementation of the given pValue. More...
 

Detailed Description

template<typename T>
struct adtf::base::ant::adtf_string_forward< T >

Implementation concept template for user defined adtf_string type support (see Supported types for adtf_string<T> for writing and reading strings via interface IString).

This template is used within adtf_string.

Template Parameters
TType of specialisation. You need to implement a adtf_string_forward implementation for your string class.

Definition at line 64 of file string_intf.h.

Member Function Documentation

◆ GetConstChar()

static const char* GetConstChar ( const T *const  pValue)
inlinestatic

Retrieves a const char pointer (null-terminated).

Parameters
pValue[in] Pointer to string implementation.
Returns
the pointer to a const char* nullterminated string out of pValue
Remarks
The return value is only valid as long as pValue is alive.

Definition at line 72 of file string_intf.h.

Referenced by adtf_string< T >::Get().

◆ GetCurrentLength()

static size_t GetCurrentLength ( const T *const  pValue)
inlinestatic

Retrieves the string size of the given pValue.

Parameters
pValue[in] Pointer to string implementation.
Returns
size of the string (char count without null-terminated value)

Definition at line 84 of file string_intf.h.

Referenced by adtf_string< T >::GetLength().

◆ SetValue()

static tResult SetValue ( T *const  pValue,
const char *  strValue 
)
inlinestatic

Sets the given strValue to the string type implementation of the given pValue.

Parameters
pValue[in] Pointer to string implementation.
strValue[in] value to set.
Returns
Depends on implementation.
Return values
ERR_ACCESS_DENIEDwriting access denied, value can not be set.
ERR_MEMORYstrValue size exceeds the buffer of pValue.
ERR_NOERRORSuccessfully set.

Definition at line 101 of file string_intf.h.

Referenced by adtf_string< T >::Set().