ed
Public Member Functions | Private Attributes | List of all members
ed::io::JSONWriter Class Reference

#include <json_writer.h>

Inheritance diagram for ed::io::JSONWriter:
Inheritance graph
[legend]

Public Member Functions

void addArrayItem ()
 
void endArray ()
 
void endArrayItem ()
 
void endGroup ()
 
void finish ()
 
 JSONWriter (std::ostream &out)
 
void writeArray (const std::string &key)
 
void writeGroup (const std::string &name)
 
void writeValue (const std::string &key, const float *fs, std::size_t size)
 
void writeValue (const std::string &key, const int *is, std::size_t size)
 
void writeValue (const std::string &key, const std::string &s)
 
void writeValue (const std::string &key, const std::string *ss, std::size_t size)
 
void writeValue (const std::string &key, double d)
 
void writeValue (const std::string &key, float f)
 
void writeValue (const std::string &key, int i)
 
 ~JSONWriter ()
 
- Public Member Functions inherited from ed::io::Writer
 Writer (std::ostream &out)
 
virtual void writeValue (const std::string &key, const std::vector< float > &fs)
 
virtual void writeValue (const std::string &key, const std::vector< int > &is)
 
virtual void writeValue (const std::string &key, const std::vector< std::string > &ss)
 
virtual ~Writer ()
 

Private Attributes

bool add_comma_
 
std::vector< char > type_stack_
 

Additional Inherited Members

- Protected Attributes inherited from ed::io::Writer
std::ostreamout_
 

Detailed Description

Definition at line 15 of file json_writer.h.

Constructor & Destructor Documentation

◆ JSONWriter()

ed::io::JSONWriter::JSONWriter ( std::ostream out)
inline

Definition at line 20 of file json_writer.h.

◆ ~JSONWriter()

ed::io::JSONWriter::~JSONWriter ( )
inline

Definition at line 25 of file json_writer.h.

Member Function Documentation

◆ addArrayItem()

void ed::io::JSONWriter::addArrayItem ( )
inlinevirtual

Implements ed::io::Writer.

Definition at line 141 of file json_writer.h.

◆ endArray()

void ed::io::JSONWriter::endArray ( )
inlinevirtual

Implements ed::io::Writer.

Definition at line 160 of file json_writer.h.

◆ endArrayItem()

void ed::io::JSONWriter::endArrayItem ( )
inlinevirtual

Implements ed::io::Writer.

Definition at line 150 of file json_writer.h.

◆ endGroup()

void ed::io::JSONWriter::endGroup ( )
inlinevirtual

Implements ed::io::Writer.

Definition at line 37 of file json_writer.h.

◆ finish()

void ed::io::JSONWriter::finish ( )
inlinevirtual

Reimplemented from ed::io::Writer.

Definition at line 170 of file json_writer.h.

◆ writeArray()

void ed::io::JSONWriter::writeArray ( const std::string key)
inlinevirtual

Implements ed::io::Writer.

Definition at line 131 of file json_writer.h.

◆ writeGroup()

void ed::io::JSONWriter::writeGroup ( const std::string name)
inlinevirtual

Implements ed::io::Writer.

Definition at line 27 of file json_writer.h.

◆ writeValue() [1/7]

void ed::io::JSONWriter::writeValue ( const std::string key,
const float *  fs,
std::size_t  size 
)
inlinevirtual

Implements ed::io::Writer.

Definition at line 83 of file json_writer.h.

◆ writeValue() [2/7]

void ed::io::JSONWriter::writeValue ( const std::string key,
const int *  is,
std::size_t  size 
)
inlinevirtual

Implements ed::io::Writer.

Definition at line 99 of file json_writer.h.

◆ writeValue() [3/7]

void ed::io::JSONWriter::writeValue ( const std::string key,
const std::string s 
)
inlinevirtual

Implements ed::io::Writer.

Definition at line 65 of file json_writer.h.

◆ writeValue() [4/7]

void ed::io::JSONWriter::writeValue ( const std::string key,
const std::string ss,
std::size_t  size 
)
inlinevirtual

Implements ed::io::Writer.

Definition at line 115 of file json_writer.h.

◆ writeValue() [5/7]

void ed::io::JSONWriter::writeValue ( const std::string key,
double  d 
)
inlinevirtual

Implements ed::io::Writer.

Definition at line 74 of file json_writer.h.

◆ writeValue() [6/7]

void ed::io::JSONWriter::writeValue ( const std::string key,
float  f 
)
inlinevirtual

Implements ed::io::Writer.

Definition at line 47 of file json_writer.h.

◆ writeValue() [7/7]

void ed::io::JSONWriter::writeValue ( const std::string key,
int  i 
)
inlinevirtual

Implements ed::io::Writer.

Definition at line 56 of file json_writer.h.

Member Data Documentation

◆ add_comma_

bool ed::io::JSONWriter::add_comma_
private

Definition at line 189 of file json_writer.h.

◆ type_stack_

std::vector<char> ed::io::JSONWriter::type_stack_
private

Definition at line 190 of file json_writer.h.


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