Projects : bitcoin : bitcoin_dumpblock_no_losers

bitcoin/src/json/json_spirit_reader.cpp

Dir - Raw

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