Simpleson
|
Class for reading object key value pairs. More...
#include <json.h>
Public Member Functions | |
kvp_reader () | |
Constructor. | |
virtual void | clear () |
Resets the reader. More... | |
virtual push_result | push (const char next) |
virtual bool | is_valid () const |
Checks if the stored value is valid. More... | |
virtual std::string | readout () const |
Reads out the key value pair. More... | |
![]() | |
reader () | |
Reader constructor. | |
virtual void | clear () |
Resets the reader. More... | |
virtual push_result | push (const char next) |
virtual jtype::jtype | type () const |
Checks the value. More... | |
virtual bool | is_valid () const |
Checks if the stored value is valid. More... | |
virtual std::string | readout () const |
Returns the stored value. More... | |
virtual | ~reader () |
Destructor. | |
Additional Inherited Members | |
![]() | |
enum | push_result { ACCEPTED , REJECTED , WHITESPACE } |
![]() | |
enum | string_reader_enum { STRING_EMPTY = 0 , STRING_OPENING_QUOTE , STRING_OPEN , STRING_ESCAPED , STRING_CODE_POINT_START , STRING_CODE_POINT_1 , STRING_CODE_POINT_2 , STRING_CODE_POINT_3 , STRING_CLOSED } |
Enumeration of the state machine for strings. More... | |
enum | number_reader_enum { NUMBER_EMPTY = 0 , NUMBER_OPEN_NEGATIVE , NUMBER_ZERO , NUMBER_INTEGER_DIGITS , NUMBER_DECIMAL , NUMBER_FRACTION_DIGITS , NUMBER_EXPONENT , NUMBER_EXPONENT_SIGN , NUMBER_EXPONENT_DIGITS } |
enum | array_reader_enum { ARRAY_EMPTY = 0 , ARRAY_OPEN_BRACKET , ARRAY_READING_VALUE , ARRAY_AWAITING_NEXT_LINE , ARRAY_CLOSED } |
enum | object_reader_enum { OBJECT_EMPTY = 0 , OBJECT_OPEN_BRACE , OBJECT_READING_ENTRY , OBJECT_AWAITING_NEXT_LINE , OBJECT_CLOSED } |
![]() | |
push_result | push_string (const char next) |
Pushes a character to a string value. | |
push_result | push_array (const char next) |
Pushes a character to an array value. | |
push_result | push_object (const char next) |
Pushes a character to an object value. | |
push_result | push_number (const char next) |
Pushes a character to a number value. | |
push_result | push_boolean (const char next) |
Pushes a character to a boolean value. | |
push_result | push_null (const char next) |
Pushes a character to a null value. | |
template<typename T > | |
T | get_state () const |
Returns the stored state. More... | |
template<typename T > | |
void | set_state (const T state) |
Stores the reader state. More... | |
![]() | |
reader * | sub_reader |
The subreader used during reading. More... | |
Class for reading object key value pairs.
|
inlinevirtual |
Resets the reader.
Reimplemented from json::reader.
|
inlinevirtual |
Checks if the stored value is valid.
true
if the both the key and value are valid, false
otherwise Reimplemented from json::reader.
|
virtual |
\ brief Pushes a value to the back of the reader
Reimplemented from json::reader.
|
virtual |
Reads out the key value pair.
Reimplemented from json::reader.