ADTF  3.18.2
cStringRedirect
Inheritance diagram for cStringRedirect:
[legend]

Public Member Functions

 cStringRedirect (std::function< tResult(const ant::IString &)> fnForward)
 
tResult Set (const char *strValue) override
 Sets the given null-terminated string to the implementation. More...
 
size_t GetLength () const override
 Gets the current size of the strng. More...
 
const char * Get () const override
 Gets the pointer to the current associated nullterminated-string. More...
 

Private Attributes

std::function< tResult(const ant::IString &)> m_fnForward
 

Additional Inherited Members

- Static Public Attributes inherited from IString
static constexpr size_t InvalidPos = g_npos
 Invalid Position size.
 

Detailed Description

Definition at line 302 of file string_intf.h.

Member Function Documentation

◆ Get()

const char* 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 IString.

Definition at line 320 of file string_intf.h.

◆ GetLength()

size_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 IString.

Definition at line 315 of file string_intf.h.

◆ Set()

tResult 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 IString.

Definition at line 310 of file string_intf.h.