ADTF  3.18.2
cParserHelper

Parser helper. More...

Static Public Member Functions

static tVoid SkipWhitespace (const tChar *&p, const tChar *pAdditionalWhitechars=nullptr)
 Advances the pointer to point at a position after the next whitespace sequence. More...
 
static tBool GetNextWord (const tChar *&pSrc, cString &strDest, const tChar *pAdditionalSeparator=nullptr, tBool bUseEscape=tTrue)
 Copies the next word in a string into a string object. More...
 
static tVoid SeekChars (const tChar *&p, const tChar *pChars, tBool bIgnoreQuotes=tFalse)
 Advances a pointer in a string to the next occurance of specified characters. More...
 
static tVoid SeekString (const tChar *&p, const tChar *pString, tChar *ptrComment=nullptr, tBool bIgnoreQuotes=tFalse)
 Advances a pointer in a string to the next occurcance of a string. More...
 

Detailed Description

Parser helper.

Definition at line 18 of file parserhelper.h.

Member Function Documentation

◆ GetNextWord()

static tBool GetNextWord ( const tChar *&  pSrc,
cString strDest,
const tChar pAdditionalSeparator = nullptr,
tBool  bUseEscape = tTrue 
)
static

Copies the next word in a string into a string object.

Parameters
pSrc[in] The source string.
strDest[out] The destination string.
pAdditionalSeparator[in] Additional separator characters.
bUseEscape[in] Uses the \ character to detect a word too
Returns
tTrue if successful, otherwise tFalse.

◆ SeekChars()

static tVoid SeekChars ( const tChar *&  p,
const tChar pChars,
tBool  bIgnoreQuotes = tFalse 
)
static

Advances a pointer in a string to the next occurance of specified characters.

Parameters
p[inout] The current position.
pChars[in] The characters to look for.
bIgnoreQuotes[in] Whether or not to ignore occurences which occur between quotes.
Returns
void
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ SeekString()

static tVoid SeekString ( const tChar *&  p,
const tChar pString,
tChar ptrComment = nullptr,
tBool  bIgnoreQuotes = tFalse 
)
static

Advances a pointer in a string to the next occurcance of a string.

Parameters
p[inout] The current position.
pString[in] The string to look for.
ptrComment[out] Optional buffer that will be filled with the skipped characters.
bIgnoreQuotes[in] Whether or not to ignore occurences which occur between quotes.
Returns
void
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ SkipWhitespace()

static tVoid SkipWhitespace ( const tChar *&  p,
const tChar pAdditionalWhitechars = nullptr 
)
static

Advances the pointer to point at a position after the next whitespace sequence.

Parameters
p[inout] The current position.
pAdditionalWhitechars[in] Additional characters which are to be skipped.
Returns
void
This method is real-time safe.\nSee @ref page_real_time_safe.\n