Guitarix
gx_system::JsonStringWriter Class Reference

#include <gx_json.h>

Inheritance diagram for gx_system::JsonStringWriter:
gx_system::JsonWriter

Public Member Functions

 JsonStringWriter ()
 
void send_notify_begin (const char *method)
 
void send_notify_end ()
 
void reset ()
 
void finish ()
 
std::string get_string ()
 
- Public Member Functions inherited from gx_system::JsonWriter
 JsonWriter (ostream *o=0, bool enable_newlines=true)
 
virtual ~JsonWriter ()
 
void reset ()
 
void set_stream (ostream *o)
 
bool good ()
 
void flush ()
 
virtual void close ()
 
bool is_closed ()
 
void write (float v, bool nl=false)
 
void write (double v, bool nl=false)
 
void write (int i, bool nl=false)
 
void write (unsigned int i, bool nl=false)
 
void write (const char *p, bool nl=false)
 
void write (const string &s, bool nl=false)
 
void write_kv (const char *key, float v)
 
void write_kv (const char *key, double v)
 
void write_kv (const char *key, int i)
 
void write_kv (const char *key, unsigned int i)
 
void write_kv (const char *key, const char *p)
 
void write_kv (const char *key, const std::string &s)
 
void write_lit (const string &s, bool nl=false)
 
void begin_object (bool nl=false)
 
void end_object (bool nl=false)
 
void begin_array (bool nl=false)
 
void end_array (bool nl=false)
 
void write_key (const char *p, bool nl=false)
 
void write_key (const string &p, bool nl=false)
 
void write_null (bool nl=false)
 
void newline ()
 

Private Attributes

ostringstream stream
 

Detailed Description

Definition at line 99 of file gx_json.h.

Constructor & Destructor Documentation

◆ JsonStringWriter()

gx_system::JsonStringWriter::JsonStringWriter ( )
inline

Definition at line 103 of file gx_json.h.

Member Function Documentation

◆ finish()

void gx_system::JsonStringWriter::finish ( )
inline

Definition at line 107 of file gx_json.h.

◆ get_string()

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

Definition at line 108 of file gx_json.h.

◆ reset()

void gx_system::JsonStringWriter::reset ( void  )
inline

Definition at line 106 of file gx_json.h.

◆ send_notify_begin()

void gx_system::JsonStringWriter::send_notify_begin ( const char *  method)

◆ send_notify_end()

void gx_system::JsonStringWriter::send_notify_end ( )

Member Data Documentation

◆ stream

ostringstream gx_system::JsonStringWriter::stream
private

Definition at line 101 of file gx_json.h.

Referenced by finish(), get_string(), JsonStringWriter(), and reset().


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