Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
utility::json_spirit Namespace Reference

Namespaces

 internal_
 

Classes

struct  Config_map
 
struct  Config_vector
 
struct  Error_position
 
class  Generator
 
class  Json_grammer
 
struct  Multi_pass_iters
 
struct  Null
 
struct  Pair_impl
 
class  Semantic_actions
 
class  Stream_reader
 
class  Stream_reader_thrower
 
class  Value_impl
 

Typedefs

typedef Config_vector
< std::string > 
Config
 
typedef Config::Value_type Value
 
typedef Config::Pair_type Pair
 
typedef Config::Object_type Object
 
typedef Config::Array_type Array
 
typedef Config_vector
< std::wstring > 
wConfig
 
typedef wConfig::Value_type wValue
 
typedef wConfig::Pair_type wPair
 
typedef wConfig::Object_type wObject
 
typedef wConfig::Array_type wArray
 
typedef Config_map< std::string > mConfig
 
typedef mConfig::Value_type mValue
 
typedef mConfig::Object_type mObject
 
typedef mConfig::Array_type mArray
 
typedef Config_map< std::wstring > wmConfig
 
typedef wmConfig::Value_type wmValue
 
typedef wmConfig::Object_type wmObject
 
typedef wmConfig::Array_type wmArray
 

Enumerations

enum  Value_type {
  obj_type, array_type, str_type, bool_type,
  int_type, real_type, null_type
}
 
enum  Output_options { pretty_print = 0x01, raw_utf8 = 0x02, remove_trailing_zeros = 0x04, single_line_arrays = 0x08 }
 

Functions

template<class Iter_type >
bool is_eq (Iter_type first, Iter_type last, const char *c_str)
 
template<class Char_type >
Char_type hex_to_num (const Char_type c)
 
template<class Char_type , class Iter_type >
Char_type hex_str_to_char (Iter_type &begin)
 
template<class Char_type , class Iter_type >
Char_type unicode_str_to_char (Iter_type &begin)
 
template<class String_type >
void append_esc_char_and_incr_iter (String_type &s, typename String_type::const_iterator &begin, typename String_type::const_iterator end)
 
template<class String_type >
String_type substitute_esc_chars (typename String_type::const_iterator begin, typename String_type::const_iterator end)
 
template<class String_type >
String_type get_str_ (typename String_type::const_iterator begin, typename String_type::const_iterator end)
 
std::string get_str (std::string::const_iterator begin, std::string::const_iterator end)
 
std::wstring get_str (std::wstring::const_iterator begin, std::wstring::const_iterator end)
 
template<class String_type , class Iter_type >
String_type get_str (Iter_type begin, Iter_type end)
 
template<typename Iter_type >
void throw_error (spirit_namespace::position_iterator< Iter_type > i, const std::string &reason)
 
template<typename Iter_type >
void throw_error (Iter_type, const std::string &reason)
 
template<class Iter_type , class Value_type >
void add_posn_iter_and_read_range_or_throw (Iter_type begin, Iter_type end, Value_type &value)
 
template<class Iter_type , class Value_type >
Iter_type read_range_or_throw (Iter_type begin, Iter_type end, Value_type &value)
 
template<class Iter_type , class Value_type >
bool read_range (Iter_type &begin, Iter_type end, Value_type &value)
 
template<class String_type , class Value_type >
bool read_string (const String_type &s, Value_type &value)
 
template<class String_type , class Value_type >
void read_string_or_throw (const String_type &s, Value_type &value)
 
template<class Istream_type , class Value_type >
bool read_stream (Istream_type &is, Value_type &value)
 
template<class Istream_type , class Value_type >
void read_stream_or_throw (Istream_type &is, Value_type &value)
 
bool has_value (const mObject &obj, const std::string &name)
 
mValue get_value (const mObject &obj, const std::string &name)
 
mObject get_mObject (const mObject &obj, const std::string &name)
 
mArray get_mArray (const mObject &obj, const std::string &name)
 
mArray read_mArray (const std::string &json_string)
 
mObject read_mObject (const std::string &json_string)
 
std::string get_string (const mObject &obj, const std::string &name)
 
std::string get_string_or_empty (const mObject &obj, const std::string &name)
 
double get_real (const mObject &obj, const std::string &name)
 
double get_real_or_zero (const mObject &obj, const std::string &name)
 
int get_int (const mObject &obj, const std::string &name)
 
int get_int_or_zero (const mObject &obj, const std::string &name)
 
template<class Obj_t , class Map_t >
void obj_to_map (const Obj_t &obj, Map_t &mp_obj)
 
template<class Obj_t , class Map_t >
void map_to_obj (const Map_t &mp_obj, Obj_t &obj)
 
template<class Object_type , class String_type >
const
Object_type::value_type::Value_type & 
find_value (const Object_type &obj, const String_type &name)
 
bool operator== (const Null &, const Null &)
 
template<class String_type >
String_type to_str (const char *c_str)
 
char to_hex_char (unsigned int c)
 
template<class String_type >
String_type non_printable_to_string (unsigned int c)
 
template<typename Char_type , class String_type >
bool add_esc_char (Char_type c, String_type &s)
 
template<class String_type >
String_type add_esc_chars (const String_type &s, bool raw_utf8)
 
template<class Ostream >
void append_double (Ostream &os, const double d, const int precision)
 
template<class String_type >
void erase_and_extract_exponent (String_type &str, String_type &exp)
 
template<class String_type >
String_type::size_type find_first_non_zero (const String_type &str)
 
template<class String_type >
void remove_trailing (String_type &str)
 
template<class Value_type , class Ostream_type >
void write_stream (const Value_type &value, Ostream_type &os, unsigned int options=0)
 
template<class Value_type >
Value_type::String_type write_string (const Value_type &value, unsigned int options=0)
 

Variables

const
spirit_namespace::int_parser
< boost::int64_t
int64_p = spirit_namespace::int_parser < boost::int64_t >()
 
const
spirit_namespace::uint_parser
< boost::uint64_t
uint64_p = spirit_namespace::uint_parser< boost::uint64_t >()
 

Typedef Documentation

Enumeration Type Documentation

Enumerator
pretty_print 
raw_utf8 
remove_trailing_zeros 
single_line_arrays 
Enumerator
obj_type 
array_type 
str_type 
bool_type 
int_type 
real_type 
null_type 

Function Documentation

template<typename Char_type , class String_type >
bool utility::json_spirit::add_esc_char ( Char_type  c,
String_type &  s 
)

Referenced by add_esc_chars().

template<class String_type >
String_type utility::json_spirit::add_esc_chars ( const String_type &  s,
bool  raw_utf8 
)
template<class Iter_type , class Value_type >
void utility::json_spirit::add_posn_iter_and_read_range_or_throw ( Iter_type  begin,
Iter_type  end,
Value_type &  value 
)
template<class Ostream >
void utility::json_spirit::append_double ( Ostream &  os,
const double  d,
const int  precision 
)
template<class String_type >
void utility::json_spirit::append_esc_char_and_incr_iter ( String_type &  s,
typename String_type::const_iterator begin,
typename String_type::const_iterator  end 
)

References begin.

Referenced by substitute_esc_chars().

template<class String_type >
void utility::json_spirit::erase_and_extract_exponent ( String_type &  str,
String_type &  exp 
)

Referenced by remove_trailing().

template<class String_type >
String_type::size_type utility::json_spirit::find_first_non_zero ( const String_type &  str)
template<class Object_type , class String_type >
const Object_type::value_type::Value_type& utility::json_spirit::find_value ( const Object_type &  obj,
const String_type &  name 
)
int utility::json_spirit::get_int ( const mObject &  obj,
const std::string &  name 
)
int utility::json_spirit::get_int_or_zero ( const mObject &  obj,
const std::string &  name 
)

References get_real(), and has_value().

mArray utility::json_spirit::get_mArray ( const mObject &  obj,
const std::string &  name 
)
mObject utility::json_spirit::get_mObject ( const mObject &  obj,
const std::string &  name 
)
double utility::json_spirit::get_real ( const mObject &  obj,
const std::string &  name 
)
double utility::json_spirit::get_real_or_zero ( const mObject &  obj,
const std::string &  name 
)

References get_real(), and has_value().

std::string utility::json_spirit::get_str ( std::string::const_iterator  begin,
std::string::const_iterator  end 
)
inline
std::wstring utility::json_spirit::get_str ( std::wstring::const_iterator  begin,
std::wstring::const_iterator  end 
)
inline
template<class String_type , class Iter_type >
String_type utility::json_spirit::get_str ( Iter_type  begin,
Iter_type  end 
)

References get_str().

template<class String_type >
String_type utility::json_spirit::get_str_ ( typename String_type::const_iterator  begin,
typename String_type::const_iterator  end 
)
std::string utility::json_spirit::get_string ( const mObject &  obj,
const std::string &  name 
)
std::string utility::json_spirit::get_string_or_empty ( const mObject &  obj,
const std::string &  name 
)
mValue utility::json_spirit::get_value ( const mObject &  obj,
const std::string &  name 
)
bool utility::json_spirit::has_value ( const mObject &  obj,
const std::string &  name 
)
template<class Char_type , class Iter_type >
Char_type utility::json_spirit::hex_str_to_char ( Iter_type &  begin)

References hex_to_num().

template<class Char_type >
Char_type utility::json_spirit::hex_to_num ( const Char_type  c)
template<class Iter_type >
bool utility::json_spirit::is_eq ( Iter_type  first,
Iter_type  last,
const char *  c_str 
)
template<class Obj_t , class Map_t >
void utility::json_spirit::map_to_obj ( const Map_t &  mp_obj,
Obj_t &  obj 
)
template<class String_type >
String_type utility::json_spirit::non_printable_to_string ( unsigned int  c)
template<class Obj_t , class Map_t >
void utility::json_spirit::obj_to_map ( const Obj_t &  obj,
Map_t &  mp_obj 
)
bool utility::json_spirit::operator== ( const Null &  ,
const Null &   
)
inline
mArray utility::json_spirit::read_mArray ( const std::string &  json_string)
mObject utility::json_spirit::read_mObject ( const std::string &  json_string)
template<class Iter_type , class Value_type >
bool utility::json_spirit::read_range ( Iter_type &  begin,
Iter_type  end,
Value_type &  value 
)
template<class Iter_type , class Value_type >
Iter_type utility::json_spirit::read_range_or_throw ( Iter_type  begin,
Iter_type  end,
Value_type &  value 
)
template<class Istream_type , class Value_type >
bool utility::json_spirit::read_stream ( Istream_type &  is,
Value_type &  value 
)
template<class Istream_type , class Value_type >
void utility::json_spirit::read_stream_or_throw ( Istream_type &  is,
Value_type &  value 
)
template<class String_type , class Value_type >
bool utility::json_spirit::read_string ( const String_type &  s,
Value_type &  value 
)

References begin, read_range(), and value.

template<class String_type , class Value_type >
void utility::json_spirit::read_string_or_throw ( const String_type &  s,
Value_type &  value 
)
template<class String_type >
void utility::json_spirit::remove_trailing ( String_type &  str)
template<class String_type >
String_type utility::json_spirit::substitute_esc_chars ( typename String_type::const_iterator  begin,
typename String_type::const_iterator  end 
)
template<typename Iter_type >
void utility::json_spirit::throw_error ( spirit_namespace::position_iterator< Iter_type >  i,
const std::string &  reason 
)
template<typename Iter_type >
void utility::json_spirit::throw_error ( Iter_type  ,
const std::string &  reason 
)
char utility::json_spirit::to_hex_char ( unsigned int  c)
inline

Referenced by non_printable_to_string().

template<class String_type >
String_type utility::json_spirit::to_str ( const char *  c_str)
template<class Char_type , class Iter_type >
Char_type utility::json_spirit::unicode_str_to_char ( Iter_type &  begin)

References hex_to_num().

template<class Value_type , class Ostream_type >
void utility::json_spirit::write_stream ( const Value_type &  value,
Ostream_type &  os,
unsigned int  options = 0 
)

References options, and value.

Referenced by write_string().

template<class Value_type >
Value_type::String_type utility::json_spirit::write_string ( const Value_type &  value,
unsigned int  options = 0 
)

References options, and write_stream().

Variable Documentation

const spirit_namespace::int_parser< boost::int64_t > utility::json_spirit::int64_p = spirit_namespace::int_parser < boost::int64_t >()
const spirit_namespace::uint_parser< boost::uint64_t > utility::json_spirit::uint64_p = spirit_namespace::uint_parser< boost::uint64_t >()