17 public std::map<AString, AString>
24 cNameValueParser(
const char * a_Data,
size_t a_Size,
bool a_AllowsKeyOnly =
true);
27 void Parse(
const char * a_Data,
size_t a_Size);
bool IsFinished(void) const
Returns true if the parser expects no more data.
bool Finish(void)
Notifies the parser that no more data will be coming.
bool IsValid(void) const
Returns true if the data parsed so far was valid.
eState m_State
The current state of the parser.
@ psValueInDQuotes
Just parsed a Double-quote sign after the Equal sign.
@ psEqual
Just parsed the = sign after a name.
@ psFinished
The parser has already been instructed to finish and doesn't expect any more data.
@ psInvalid
The parser has encountered an invalid input; further parsing is skipped.
@ psEqualSpace
Space after m_CurrentKey.
@ psAfterValue
Just finished parsing the value, waiting for semicolon or data end.
@ psKey
Currently adding more chars to the key in m_CurrentKey.
@ psValueRaw
Just parsed a raw value without a quote.
@ psKeySpace
Parsing the space in front of the next key.
@ psValueInSQuotes
Just parsed a Single-quote sign after the Equal sign.
bool m_AllowsKeyOnly
If true, the parser will accept keys without an equal sign and the value.
AString m_CurrentValue
Buffer for the current Value;.
cNameValueParser(bool a_AllowsKeyOnly=true)
Creates an empty parser.
AString m_CurrentKey
Buffer for the current Key.
void Parse(const char *a_Data, size_t a_Size)
Parses the data given.