Flow123d  JS_before_hm-1884-g94bc49f8c
json_spirit_writer.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_writer.h"
8 
9 using namespace json_spirit;
10 
11 #ifdef JSON_SPIRIT_VALUE_ENABLED
12  void json_spirit::write( const Value& value, std::ostream& os, unsigned int options )
13  {
14  write_stream( value, os, options );
15  }
16  std::string json_spirit::write( const Value& value, unsigned int options )
17  {
18  return write_string( value, options );
19  }
20 
21  void json_spirit::write_formatted( const Value& value, std::ostream& os )
22  {
24  }
25 
26  std::string json_spirit::write_formatted( const Value& value )
27  {
28  return write_string( value, pretty_print );
29  }
30 #endif
31 
32 #ifdef JSON_SPIRIT_MVALUE_ENABLED
33  void json_spirit::write( const mValue& value, std::ostream& os, unsigned int options )
34  {
35  write_stream( value, os, options );
36  }
37 
38  std::string json_spirit::write( const mValue& value, unsigned int options )
39  {
40  return write_string( value, options );
41  }
42 
43  void json_spirit::write_formatted( const mValue& value, std::ostream& os )
44  {
46  }
47 
49  {
50  return write_string( value, pretty_print );
51  }
52 #endif
53 
54 #if defined( JSON_SPIRIT_WVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
55  void json_spirit::write( const wValue& value, std::wostream& os, unsigned int options )
56  {
57  write_stream( value, os, options );
58  }
59 
60  std::wstring json_spirit::write( const wValue& value, unsigned int options )
61  {
62  return write_string( value, options );
63  }
64 
65  void json_spirit::write_formatted( const wValue& value, std::wostream& os )
66  {
68  }
69 
70  std::wstring json_spirit::write_formatted( const wValue& value )
71  {
72  return write_string( value, pretty_print );
73  }
74 #endif
75 
76 #if defined( JSON_SPIRIT_WMVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
77  void json_spirit::write_formatted( const wmValue& value, std::wostream& os )
78  {
80  }
81 
82  std::wstring json_spirit::write_formatted( const wmValue& value )
83  {
84  return write_string( value, pretty_print );
85  }
86 
87  void json_spirit::write( const wmValue& value, std::wostream& os, unsigned int options )
88  {
89  write_stream( value, os, options );
90  }
91 
92  std::wstring json_spirit::write( const wmValue& value, unsigned int options )
93  {
94  return write_string( value, options );
95  }
96 #endif
json_spirit::write_stream
void write_stream(const Value_type &value, Ostream_type &os, unsigned int options=0)
Definition: json_spirit_writer_template.h:360
json_spirit::pretty_print
@ pretty_print
Definition: json_spirit_writer_options.h:15
value
static constexpr bool value
Definition: json.hpp:87
json_spirit::Value_impl
Definition: json_spirit_value.h:38
json_spirit::write
void write(const mValue &value, std::ostream &os, unsigned int options=0)
Definition: json_spirit_writer.cpp:33
Value
@ Value
Definition: finite_element.hh:43
json_spirit::write_string
Value_type::String_type write_string(const Value_type &value, unsigned int options=0)
Definition: json_spirit_writer_template.h:371
json_spirit::write_formatted
void write_formatted(const mValue &value, std::ostream &os)
Definition: json_spirit_writer.cpp:43
json_spirit
Definition: json_spirit_error_position.h:15
json_spirit_writer.h
json_spirit_writer_template.h