ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitCommon/JSONSpirit/src/json_spirit_reader.cpp
Revision: 1.1
Committed: Tue Jun 29 15:47:51 2010 UTC (14 years, 10 months ago) by bendavid
Branch: MAIN
CVS Tags: Mit_032, Mit_031, Mit_025c_branch2, Mit_025c_branch1, Mit_030, Mit_029c, Mit_030_pre1, Mit_029a, Mit_029, Mit_029_pre1, Mit_028a, Mit_025c_branch0, Mit_028, Mit_027a, Mit_027, Mit_026, Mit_025e, Mit_025d, Mit_025c, Mit_025b, Mit_025a, Mit_025, Mit_025pre2, Mit_024b, Mit_025pre1, Mit_024a, Mit_024, Mit_023, Mit_022a, Mit_022, Mit_020d, TMit_020d, Mit_020c, Mit_021, Mit_021pre2, Mit_021pre1, Mit_020b, Mit_020a, Mit_020, Mit_020pre1, Mit_018, Mit_017, Mit_017pre3, Mit_017pre2, Mit_017pre1, V07-05-00, Mit_016, Mit_015b, Mit_015a, Mit_015, Mit_014e, Mit_014d, Mit_014c, HEAD
Branch point for: Mit_025c_branch
Log Message:
Add JSONSpirit library

File Contents

# User Rev Content
1 bendavid 1.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    
9     using namespace json_spirit;
10    
11     bool json_spirit::read( const std::string& s, Value& value )
12     {
13     return read_string( s, value );
14     }
15    
16     void json_spirit::read_or_throw( const std::string& s, Value& value )
17     {
18     read_string_or_throw( s, value );
19     }
20    
21     bool json_spirit::read( std::istream& is, Value& value )
22     {
23     return read_stream( is, value );
24     }
25    
26     void json_spirit::read_or_throw( std::istream& is, Value& value )
27     {
28     read_stream_or_throw( is, value );
29     }
30    
31     bool 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    
36     void 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    
43     bool json_spirit::read( const std::wstring& s, wValue& value )
44     {
45     return read_string( s, value );
46     }
47    
48     void json_spirit::read_or_throw( const std::wstring& s, wValue& value )
49     {
50     read_string_or_throw( s, value );
51     }
52    
53     bool json_spirit::read( std::wistream& is, wValue& value )
54     {
55     return read_stream( is, value );
56     }
57    
58     void json_spirit::read_or_throw( std::wistream& is, wValue& value )
59     {
60     read_stream_or_throw( is, value );
61     }
62    
63     bool 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    
68     void 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    
75     bool json_spirit::read( const std::string& s, mValue& value )
76     {
77     return read_string( s, value );
78     }
79    
80     void json_spirit::read_or_throw( const std::string& s, mValue& value )
81     {
82     read_string_or_throw( s, value );
83     }
84    
85     bool json_spirit::read( std::istream& is, mValue& value )
86     {
87     return read_stream( is, value );
88     }
89    
90     void json_spirit::read_or_throw( std::istream& is, mValue& value )
91     {
92     read_stream_or_throw( is, value );
93     }
94    
95     bool 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    
100     void 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    
107     bool json_spirit::read( const std::wstring& s, wmValue& value )
108     {
109     return read_string( s, value );
110     }
111    
112     void json_spirit::read_or_throw( const std::wstring& s, wmValue& value )
113     {
114     read_string_or_throw( s, value );
115     }
116    
117     bool json_spirit::read( std::wistream& is, wmValue& value )
118     {
119     return read_stream( is, value );
120     }
121    
122     void json_spirit::read_or_throw( std::wistream& is, wmValue& value )
123     {
124     read_stream_or_throw( is, value );
125     }
126    
127     bool 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    
132     void 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