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

Wrapping template for a rvalue reference of an IString interface for the type T. More...

#include <string_intf.h>

Inherits adtf::base::ant::IString, and adtf::base::ant::adtf_string_forward< T >.

Public Member Functions

 adtf_string (value_type *pstrAssignValue)
 
 ~adtf_string ()
 DTOR.
 
tResult Set (const char *strValue) override
 
const char * Get () const override
 
size_t GetLength () const override
 

Additional Inherited Members

- Static Public Attributes inherited from adtf::base::ant::IString
static constexpr size_t InvalidPos = g_npos
 Invalid Position size.
 
- Static Protected Member Functions inherited from adtf::base::ant::adtf_string_forward< T >
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 Protected Attributes inherited from adtf::base::ant::adtf_string_forward< T >
static constexpr bool is_mutable = false
 

Detailed Description

template<typename T>
class adtf::base::ant::adtf_string< T >

Wrapping template for a rvalue reference of an IString interface for the type T.

Usually the IString is given as rvalue reference to a function call. This template used adtf_string_forward for special types.

Template Parameters
TThe String implementation to wrap into IString.

Constructor & Destructor Documentation

◆ adtf_string()

template<typename T>
adtf::base::ant::adtf_string< T >::adtf_string ( value_type * pstrAssignValue)
inlineexplicit

CTOR with pointer to the value of value_type

Parameters
pstrAssignValue[in] pointer to the value

Member Function Documentation

◆ Get()

template<typename T>
const char * adtf::base::ant::adtf_string< T >::Get ( ) const
inlineoverridevirtual

Gets the pointer to the current associated nullterminated-string

Returns
The pointer to the null-terminated string.
Remarks
Check the pointer, because it depends on the implementation of IString!

Implements adtf::base::ant::IString.

◆ GetLength()

template<typename T>
size_t adtf::base::ant::adtf_string< T >::GetLength ( ) const
inlineoverridevirtual

Gets the current size of the strng. Usually this is in Bytes (null-termination is not included!)

Returns
The size of the string.
Return values
Ifnot valid return InvalidPos!

Implements adtf::base::ant::IString.

◆ Set()

template<typename T>
tResult adtf::base::ant::adtf_string< T >::Set ( const char * strValue)
inlineoverridevirtual

Sets the given null-terminated string to the implementation

Parameters
strValue[in] The null-terminated string to set.
Return values
ERR_NOERRORThe value is set successfully
ERR_MEMORYThe value can not be set. Too long. No truncating provided.

Implements adtf::base::ant::IString.


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