Guitarix
|
#include <gx_json.h>
Public Types | |
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 } |
Public Member Functions | |
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) |
gx_system::JsonParser::JsonParser | ( | istream * | i = 0 | ) |
Definition at line 258 of file gx_json.cpp.
|
virtual |
Definition at line 270 of file gx_json.cpp.
|
inline |
|
virtual |
Reimplemented in gx_system::JsonReader.
Definition at line 274 of file gx_json.cpp.
Referenced by ladspa::PluginDesc::set_state().
void gx_system::JsonParser::copy_object | ( | JsonWriter & | jw | ) |
Definition at line 577 of file gx_json.cpp.
|
inline |
Definition at line 142 of file gx_json.h.
Referenced by JsonArray::append(), ladspa::ChangeableValues::ChangeableValues(), gx_engine::GxMachineRemote::load_ladspalist(), ladspa::PortDesc::PortDesc(), gx_system::SettingsFileHeader::read(), gx_jack::GxJack::read_connections(), gx_preset::PresetIO::read_online(), gx_engine::paradesc::readJSON(), gx_engine::plugdesc::readJSON(), gx_engine::Parameter::serializeJSON(), ladspa::PortDesc::set_state(), and ladspa::PluginDesc::set_state().
|
inline |
|
inline |
Definition at line 145 of file gx_json.h.
Referenced by gx_engine::ParameterV< float >::readJSON_value(), and ladspa::PortDesc::set_state().
|
inline |
Definition at line 143 of file gx_json.h.
Referenced by ladspa::ChangeableValues::ChangeableValues(), gx_engine::ParameterV< int >::compareJSON_value(), gx_engine::ParameterV< bool >::compareJSON_value(), gx_engine::GxMachineRemote::midi_get_config_mode(), gx_system::SettingsFileHeader::read(), gx_engine::ControllerArray::readJSON(), ladspa::PortDesc::set_state(), and ladspa::PluginDesc::set_state().
|
inline |
const char * gx_system::JsonParser::get_token_name | ( | token | tok | ) |
Definition at line 281 of file gx_json.cpp.
JsonParser::token gx_system::JsonParser::next | ( | token | expect = no_token | ) |
Definition at line 493 of file gx_json.cpp.
Referenced by JsonArray::append(), ladspa::ChangeableValues::ChangeableValues(), gx_engine::ParameterV< int >::compareJSON_value(), gx_engine::ParameterV< bool >::compareJSON_value(), gx_engine::GxMachineRemote::load_ladspalist(), gx_engine::GxMachineRemote::midi_get_config_mode(), ladspa::PortDesc::PortDesc(), gx_system::SettingsFileHeader::read(), gx_jack::GxJack::read_connections(), gx_preset::PresetIO::read_online(), ladspa::LadspaPluginList::readJSON(), gx_engine::paradesc::readJSON(), gx_engine::ControllerArray::readJSON(), gx_engine::plugdesc::readJSON(), gx_engine::ParameterV< float >::readJSON_value(), gx_engine::Parameter::serializeJSON(), ladspa::PortDesc::set_state(), and ladspa::PluginDesc::set_state().
|
inline |
Definition at line 138 of file gx_json.h.
Referenced by JsonArray::append(), ladspa::ChangeableValues::ChangeableValues(), gx_engine::GxMachineRemote::load_ladspalist(), ladspa::PortDesc::PortDesc(), gx_jack::GxJack::read_connections(), gx_preset::PresetIO::read_online(), ladspa::LadspaPluginList::readJSON(), gx_engine::paradesc::readJSON(), gx_engine::ControllerArray::readJSON(), gx_engine::plugdesc::readJSON(), ladspa::PortDesc::set_state(), and ladspa::PluginDesc::set_state().
bool gx_system::JsonParser::read_kv | ( | const char * | key, |
double & | v | ||
) |
Definition at line 518 of file gx_json.cpp.
bool gx_system::JsonParser::read_kv | ( | const char * | key, |
float & | v | ||
) |
Definition at line 508 of file gx_json.cpp.
Referenced by ladspa::ChangeableValues::ChangeableValues(), ladspa::PortDesc::PortDesc(), gx_preset::PresetIO::read_online(), gx_engine::paradesc::readJSON(), and gx_engine::plugdesc::readJSON().
bool gx_system::JsonParser::read_kv | ( | const char * | key, |
Glib::ustring & | s | ||
) |
Definition at line 558 of file gx_json.cpp.
bool gx_system::JsonParser::read_kv | ( | const char * | key, |
int & | i | ||
) |
Definition at line 528 of file gx_json.cpp.
bool gx_system::JsonParser::read_kv | ( | const char * | key, |
std::string & | s | ||
) |
Definition at line 548 of file gx_json.cpp.
|
inline |
bool gx_system::JsonParser::read_kv | ( | const char * | key, |
unsigned int & | i | ||
) |
Definition at line 538 of file gx_json.cpp.
void gx_system::JsonParser::reset | ( | void | ) |
Definition at line 247 of file gx_json.cpp.
Referenced by gx_system::JsonStringParser::peek_first_char().
|
inline |
Definition at line 118 of file gx_json.h.
Referenced by gx_system::JsonStringParser::get_string().
void gx_system::JsonParser::set_streampos | ( | streampos | pos | ) |
Definition at line 568 of file gx_json.cpp.
void gx_system::JsonParser::skip_object | ( | ) |
Definition at line 608 of file gx_json.cpp.
Referenced by JsonArray::append(), ladspa::ChangeableValues::ChangeableValues(), ladspa::PortDesc::PortDesc(), gx_jack::GxJack::read_connections(), and gx_preset::PresetIO::read_online().
void gx_system::JsonParser::throw_unexpected | ( | token | expect | ) |
Definition at line 300 of file gx_json.cpp.
Referenced by current_value().