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

#include <json_reader.h>

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

Public Member Functions

bool endArray ()
 
bool endGroup ()
 
std::string error ()
 
 JSONReader (const char *s)
 
bool nextArrayItem ()
 
bool ok ()
 
bool readArray (const std::string &name)
 
bool readGroup (const std::string &name)
 
bool readValue (const std::string &, double &d)
 
bool readValue (const std::string &, float &f)
 
bool readValue (const std::string &, int &i)
 
bool readValue (const std::string &, std::string &s)
 
virtual ~JSONReader ()
 
- Public Member Functions inherited from ed::io::Reader
 Reader ()
 
virtual ~Reader ()
 

Private Member Functions

template<typename T >
bool value (const std::string &key, T &value) const
 

Private Attributes

std::vector< unsigned int > array_index_stack_
 
Data data_
 
std::string error_
 
Node n_current_
 

Detailed Description

Definition at line 16 of file json_reader.h.

Constructor & Destructor Documentation

◆ JSONReader()

ed::io::JSONReader::JSONReader ( const char *  s)

Definition at line 105 of file json_reader.cpp.

◆ ~JSONReader()

ed::io::JSONReader::~JSONReader ( )
virtual

Definition at line 122 of file json_reader.cpp.

Member Function Documentation

◆ endArray()

bool ed::io::JSONReader::endArray ( )
virtual

Implements ed::io::Reader.

Definition at line 165 of file json_reader.cpp.

◆ endGroup()

bool ed::io::JSONReader::endGroup ( )
virtual

Implements ed::io::Reader.

Definition at line 141 of file json_reader.cpp.

◆ error()

std::string ed::io::JSONReader::error ( )
inlinevirtual

Implements ed::io::Reader.

Definition at line 40 of file json_reader.h.

◆ nextArrayItem()

bool ed::io::JSONReader::nextArrayItem ( )
virtual

Implements ed::io::Reader.

Definition at line 185 of file json_reader.cpp.

◆ ok()

bool ed::io::JSONReader::ok ( )
inlinevirtual

Implements ed::io::Reader.

Definition at line 38 of file json_reader.h.

◆ readArray()

bool ed::io::JSONReader::readArray ( const std::string name)
virtual

Implements ed::io::Reader.

Definition at line 150 of file json_reader.cpp.

◆ readGroup()

bool ed::io::JSONReader::readGroup ( const std::string name)
virtual

Implements ed::io::Reader.

Definition at line 128 of file json_reader.cpp.

◆ readValue() [1/4]

bool ed::io::JSONReader::readValue ( const std::string key,
double &  d 
)
virtual

Implements ed::io::Reader.

Definition at line 221 of file json_reader.cpp.

◆ readValue() [2/4]

bool ed::io::JSONReader::readValue ( const std::string key,
float &  f 
)
virtual

Implements ed::io::Reader.

Definition at line 214 of file json_reader.cpp.

◆ readValue() [3/4]

bool ed::io::JSONReader::readValue ( const std::string key,
int &  i 
)
virtual

Implements ed::io::Reader.

Definition at line 229 of file json_reader.cpp.

◆ readValue() [4/4]

bool ed::io::JSONReader::readValue ( const std::string key,
std::string s 
)
virtual

Implements ed::io::Reader.

Definition at line 236 of file json_reader.cpp.

◆ value()

template<typename T >
bool ed::io::JSONReader::value ( const std::string key,
T &  value 
) const
inlineprivate

Definition at line 51 of file json_reader.h.

Member Data Documentation

◆ array_index_stack_

std::vector<unsigned int> ed::io::JSONReader::array_index_stack_
private

Definition at line 46 of file json_reader.h.

◆ data_

Data ed::io::JSONReader::data_
private

Definition at line 44 of file json_reader.h.

◆ error_

std::string ed::io::JSONReader::error_
private

Definition at line 48 of file json_reader.h.

◆ n_current_

Node ed::io::JSONReader::n_current_
private

Definition at line 45 of file json_reader.h.


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