ADTF
Loading...
Searching...
No Matches
adtf::base::ant::adtf_string_forward< T > Struct Template Reference

#include <string_intf.h>

Inherited by adtf::base::ant::adtf_string< T > [protected].

Static Public Member Functions

static const char * GetConstChar (const T *const pValue)
 
static size_t GetCurrentLength (const T *const pValue)
 
static tResult SetValue (T *const pValue, const char *strValue)
 

Static Public Attributes

static constexpr bool is_mutable = false
 

Detailed Description

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

Implementation concept template for user defined adtf_string type support.

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.

Member Function Documentation

◆ GetConstChar()

template<typename T>
static const char * adtf::base::ant::adtf_string_forward< T >::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.

◆ GetCurrentLength()

template<typename T>
static size_t adtf::base::ant::adtf_string_forward< 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)

◆ SetValue()

template<typename T>
static tResult adtf::base::ant::adtf_string_forward< T >::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.

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