33 void Reset(
const char* data,
int limit);
115 const char* m_data{
nullptr};
Wraps a char array, providing a set of methods for parsing data from it.
Definition: CharArrayParser.h:17
uint16_t ReadNextUnsignedShort()
Reads the next two chars as unsigned short value (it is assumed that the caller has already checked t...
Definition: CharArrayParser.cpp:69
const char * GetData()
Get the current data.
Definition: CharArrayParser.h:112
bool ReadNextLine(std::string &line)
Reads a line of text. A line is considered to be terminated by any one of a carriage return ('\r')...
Definition: CharArrayParser.cpp:130
bool SkipChars(int nChars)
Skip a specified number of chars.
Definition: CharArrayParser.cpp:51
int CharsLeft()
Return the number of chars yet to be read.
Definition: CharArrayParser.cpp:29
uint32_t ReadNextUnsignedInt()
Reads the next four chars as unsigned int value (it is assumed that the caller has already checked th...
Definition: CharArrayParser.cpp:83
bool SetPosition(int position)
Set the reading offset in the array.
Definition: CharArrayParser.cpp:39
std::string ReadNextString(int length)
Reads the next string of specified length (it is assumed that the caller has already checked the avai...
Definition: CharArrayParser.cpp:99
uint8_t ReadNextUnsignedChar()
Reads the next unsigned char (it is assumed that the caller has already checked the availability of t...
Definition: CharArrayParser.cpp:56
int GetPosition()
Returns the current offset in the array.
Definition: CharArrayParser.cpp:34
bool ReadNextArray(int length, char *data)
Reads the next chars array of specified length (it is assumed that the caller has already checked the...
Definition: CharArrayParser.cpp:113
void Reset()
Sets the position and limit to zero.
Definition: CharArrayParser.cpp:16