added Space::serialize_to_string(StreamType & stream) template
This commit is contained in:
parent
99fbdc1635
commit
c1f1dc96df
|
@ -501,6 +501,27 @@ public:
|
|||
void remove(const std::wstring & field);
|
||||
|
||||
|
||||
template<typename StreamType>
|
||||
void serialize_to_string(StreamType & stream) const
|
||||
{
|
||||
if( type == type_wstring )
|
||||
{
|
||||
stream << value.value_wstring;
|
||||
}
|
||||
else
|
||||
if( type == type_string )
|
||||
{
|
||||
stream << value.value_string;
|
||||
}
|
||||
else
|
||||
{
|
||||
serialize_to_json_stream(stream);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
std::string serialize_to_space_str(bool pretty_print = false) const;
|
||||
std::wstring serialize_to_space_wstr(bool pretty_print = false) const;
|
||||
void serialize_to_space_to(std::string & str, bool pretty_print = false) const;
|
||||
|
|
Loading…
Reference in New Issue