Flow123d  master-f44eb46
json_spirit_reader.cpp
Go to the documentation of this file.
1 // Copyright John W. Wilkinson 2007 - 2011
2 // Distributed under the MIT License, see accompanying file LICENSE.txt
3 
4 // json spirit version 4.05
5 
6 #include "json_spirit_reader.h"
8 
9 using namespace json_spirit;
10 
11 #ifdef JSON_SPIRIT_VALUE_ENABLED
12  bool json_spirit::read( const std::string& s, Value& value )
13  {
14  return read_string( s, value );
15  }
16 
17  void json_spirit::read_or_throw( const std::string& s, Value& value )
18  {
20  }
21 
22  bool json_spirit::read( std::istream& is, Value& value )
23  {
24  return read_stream( is, value );
25  }
26 
27  void json_spirit::read_or_throw( std::istream& is, Value& value )
28  {
30  }
31 
32  bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value )
33  {
34  return read_range( begin, end, value );
35  }
36 
37  void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value )
38  {
39  begin = read_range_or_throw( begin, end, value );
40  }
41 #endif
42 
43 #if defined( JSON_SPIRIT_WVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
44  bool json_spirit::read( const std::wstring& s, wValue& value )
45  {
46  return read_string( s, value );
47  }
48 
49  void json_spirit::read_or_throw( const std::wstring& s, wValue& value )
50  {
52  }
53 
54  bool json_spirit::read( std::wistream& is, wValue& value )
55  {
56  return read_stream( is, value );
57  }
58 
59  void json_spirit::read_or_throw( std::wistream& is, wValue& value )
60  {
62  }
63 
64  bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value )
65  {
66  return read_range( begin, end, value );
67  }
68 
69  void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value )
70  {
71  begin = read_range_or_throw( begin, end, value );
72  }
73 #endif
74 
75 #ifdef JSON_SPIRIT_MVALUE_ENABLED
76  bool json_spirit::read( const std::string& s, mValue& value )
77  {
78  return read_string( s, value );
79  }
80 
81  void json_spirit::read_or_throw( const std::string& s, mValue& value )
82  {
84  }
85 
86  bool json_spirit::read( std::istream& is, mValue& value )
87  {
88  return read_stream( is, value );
89  }
90 
91  void json_spirit::read_or_throw( std::istream& is, mValue& value )
92  {
94  }
95 
96  bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value )
97  {
98  return read_range( begin, end, value );
99  }
100 
101  void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value )
102  {
103  begin = read_range_or_throw( begin, end, value );
104  }
105 #endif
106 
107 #if defined( JSON_SPIRIT_WMVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
108  bool json_spirit::read( const std::wstring& s, wmValue& value )
109  {
110  return read_string( s, value );
111  }
112 
113  void json_spirit::read_or_throw( const std::wstring& s, wmValue& value )
114  {
116  }
117 
118  bool json_spirit::read( std::wistream& is, wmValue& value )
119  {
120  return read_stream( is, value );
121  }
122 
123  void json_spirit::read_or_throw( std::wistream& is, wmValue& value )
124  {
126  }
127 
128  bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value )
129  {
130  return read_range( begin, end, value );
131  }
132 
133  void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value )
134  {
135  begin = read_range_or_throw( begin, end, value );
136  }
137 #endif
@ Value
static constexpr bool value
Definition: json.hpp:87
Iter_type read_range_or_throw(Iter_type begin, Iter_type end, Value_type &value)
bool read(const std::string &s, mValue &value)
void read_or_throw(const std::string &s, mValue &value)
void read_string_or_throw(const String_type &s, Value_type &value)
bool read_range(Iter_type &begin, Iter_type end, Value_type &value)
bool read_stream(Istream_type &is, Value_type &value)
void read_stream_or_throw(Istream_type &is, Value_type &value)
bool read_string(const String_type &s, Value_type &value)