ADTF
Loading...
Searching...
No Matches
adtf::base::ant::IString Class Referenceabstract

#include <string_intf.h>

Inherited by adtf::base::ant::adtf_string< T >, adtf::base::spider::cStringLengthProxy, and adtf::base::spider::cStringRedirect.

Public Member Functions

virtual tResult Set (const char *strValue)=0
 
virtual const char * Get () const =0
 
virtual size_t GetLength () const =0
 

Static Public Attributes

static constexpr size_t InvalidPos = g_npos
 Invalid Position size.
 

Detailed Description

The IString interface provides methods for getting and setting strings through abstract interfaces. See adtf_string if you want to forward your own string type.

Member Function Documentation

◆ Get()

virtual const char * adtf::base::ant::IString::Get ( ) const
pure virtual

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!

Implemented in adtf::base::adtf_string< T >, adtf::base::ant::adtf_string< T >, adtf::base::cStringRedirect, adtf::base::spider::cStringLengthProxy, and adtf::base::spider::cStringRedirect.

◆ GetLength()

virtual size_t adtf::base::ant::IString::GetLength ( ) const
pure virtual

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!

Implemented in adtf::base::adtf_string< T >, adtf::base::ant::adtf_string< T >, adtf::base::cStringRedirect, adtf::base::spider::cStringLengthProxy, and adtf::base::spider::cStringRedirect.

◆ Set()

virtual tResult adtf::base::ant::IString::Set ( const char * strValue)
pure virtual

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.

Implemented in adtf::base::adtf_string< T >, adtf::base::ant::adtf_string< T >, adtf::base::cStringRedirect, adtf::base::spider::cStringLengthProxy, and adtf::base::spider::cStringRedirect.


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