json_spirit_reader.cpp 3.5 KB

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