ADTF  3.18.2
cStringLengthProxy
Inheritance diagram for cStringLengthProxy:
[legend]

Public Member Functions

 cStringLengthProxy (const char *strValue)
 
tResult Set (const char *) 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

const char * m_strValue
 
std::optional< size_t > m_nSize
 

Additional Inherited Members

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

Detailed Description

Definition at line 269 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 292 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 282 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 277 of file string_intf.h.

References RETURN_ERROR.