ADTF
Loading...
Searching...
No Matches
adtf::base::cStringRedirect Class Reference

#include <string_intf.h>

Inherits adtf::base::ant::IString.

Public Member Functions

 cStringRedirect (std::function< tResult(const ant::IString &)> fnForward)
 
tResult Set (const char *strValue) override
 
size_t GetLength () const override
 
const char * Get () const override
 

Additional Inherited Members

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

Detailed Description

String redirect class to forward the string set operation without copy of the string value.

Member Function Documentation

◆ Get()

const char * adtf::base::spider::cStringRedirect::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()

size_t adtf::base::spider::cStringRedirect::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()

tResult adtf::base::spider::cStringRedirect::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: