Guitarix
gx_system::JsonStringParser Class Reference

#include <gx_json.h>

Inheritance diagram for gx_system::JsonStringParser:
gx_system::JsonParser

Public Member Functions

 JsonStringParser ()
 
void put (char c)
 
std::ostream & get_ostream ()
 
void start_parser ()
 
std::string get_string ()
 
void reset ()
 
char peek_first_char ()
 
- Public Member Functions inherited from gx_system::JsonParser
 JsonParser (istream *i=0)
 
virtual ~JsonParser ()
 
virtual void close ()
 
void reset ()
 
bool is_closed ()
 
void set_stream (istream *i)
 
istream * get_stream ()
 
const char * get_token_name (token tok)
 
bool good ()
 
token next (token expect=no_token)
 
token peek ()
 
streampos get_streampos ()
 
void set_streampos (streampos pos)
 
void check_expect (token expect)
 
string current_value () const
 
int current_value_int ()
 
unsigned int current_value_uint ()
 
float current_value_float ()
 
double current_value_double ()
 
bool read_kv (const char *key, float &v)
 
bool read_kv (const char *key, double &v)
 
bool read_kv (const char *key, int &i)
 
bool read_kv (const char *key, unsigned int &i)
 
bool read_kv (const char *key, std::string &s)
 
bool read_kv (const char *key, Glib::ustring &s)
 
template<class T >
bool read_kv (const char *key, T &v)
 
void copy_object (JsonWriter &jw)
 
void skip_object ()
 
void throw_unexpected (token expect)
 

Private Attributes

std::stringstream stream
 

Additional Inherited Members

- Public Types inherited from gx_system::JsonParser
enum  token {
  no_token = 0x0000 , end_token = 0x0001 , begin_object = 0x002 , end_object = 0x0004 ,
  begin_array = 0x0008 , end_array = 0x0010 , value_string = 0x0020 , value_number = 0x0040 ,
  value_key = 0x0080 , value_null = 0x0100 , value_false = 0x0200 , value_true = 0x0400 ,
  value_bool = 0x0600
}
 

Detailed Description

Definition at line 202 of file gx_json.h.

Constructor & Destructor Documentation

◆ JsonStringParser()

gx_system::JsonStringParser::JsonStringParser ( )
inline

Definition at line 206 of file gx_json.h.

Member Function Documentation

◆ get_ostream()

std::ostream & gx_system::JsonStringParser::get_ostream ( )
inline

Definition at line 208 of file gx_json.h.

◆ get_string()

std::string gx_system::JsonStringParser::get_string ( )
inline

Definition at line 210 of file gx_json.h.

◆ peek_first_char()

char gx_system::JsonStringParser::peek_first_char ( )
inline

Definition at line 212 of file gx_json.h.

◆ put()

void gx_system::JsonStringParser::put ( char  c)
inline

Definition at line 207 of file gx_json.h.

◆ reset()

void gx_system::JsonStringParser::reset ( void  )
inline

Definition at line 211 of file gx_json.h.

◆ start_parser()

void gx_system::JsonStringParser::start_parser ( )
inline

Definition at line 209 of file gx_json.h.

Member Data Documentation

◆ stream

std::stringstream gx_system::JsonStringParser::stream
private

Definition at line 204 of file gx_json.h.

Referenced by get_ostream(), get_string(), peek_first_char(), put(), reset(), and start_parser().


The documentation for this class was generated from the following file: