|
|
|
@ -42,7 +42,7 @@
|
|
|
|
|
#include "convert/convert.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace PT
|
|
|
|
|
namespace pt
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
Space::Space()
|
|
|
|
@ -922,7 +922,7 @@ std::string Space::to_str() const
|
|
|
|
|
|
|
|
|
|
if( type == type_wstring )
|
|
|
|
|
{
|
|
|
|
|
PT::TextStream stream;
|
|
|
|
|
TextStream stream;
|
|
|
|
|
serialize_string_buffer(value.value_wstring.c_str(), stream, Escape::no_escape);
|
|
|
|
|
stream.to_string(str);
|
|
|
|
|
return str;
|
|
|
|
@ -942,7 +942,7 @@ std::wstring Space::to_wstr() const
|
|
|
|
|
|
|
|
|
|
if( type == type_string )
|
|
|
|
|
{
|
|
|
|
|
PT::UTF8ToWide(value.value_string, str);
|
|
|
|
|
UTF8ToWide(value.value_string, str);
|
|
|
|
|
return str;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1277,7 +1277,7 @@ std::wstring Space::serialize_to_space_wstr(bool pretty_print) const
|
|
|
|
|
|
|
|
|
|
void Space::serialize_to_space_to(std::string & str, bool pretty_print) const
|
|
|
|
|
{
|
|
|
|
|
PT::TextStream stream;
|
|
|
|
|
TextStream stream;
|
|
|
|
|
serialize_to_space_stream(stream, pretty_print);
|
|
|
|
|
|
|
|
|
|
stream.to_string(str);
|
|
|
|
@ -1286,7 +1286,7 @@ void Space::serialize_to_space_to(std::string & str, bool pretty_print) const
|
|
|
|
|
|
|
|
|
|
void Space::serialize_to_space_to(std::wstring & str, bool pretty_print) const
|
|
|
|
|
{
|
|
|
|
|
PT::WTextStream stream;
|
|
|
|
|
WTextStream stream;
|
|
|
|
|
serialize_to_space_stream(stream, pretty_print);
|
|
|
|
|
|
|
|
|
|
stream.to_string(str);
|
|
|
|
@ -1312,7 +1312,7 @@ std::wstring Space::serialize_to_json_wstr() const
|
|
|
|
|
|
|
|
|
|
void Space::serialize_to_json_to(std::string & str) const
|
|
|
|
|
{
|
|
|
|
|
PT::TextStream stream;
|
|
|
|
|
TextStream stream;
|
|
|
|
|
serialize_to_json_stream(stream);
|
|
|
|
|
|
|
|
|
|
stream.to_string(str);
|
|
|
|
@ -1321,7 +1321,7 @@ void Space::serialize_to_json_to(std::string & str) const
|
|
|
|
|
|
|
|
|
|
void Space::serialize_to_json_to(std::wstring & str) const
|
|
|
|
|
{
|
|
|
|
|
PT::WTextStream stream;
|
|
|
|
|
WTextStream stream;
|
|
|
|
|
serialize_to_json_stream(stream);
|
|
|
|
|
|
|
|
|
|
stream.to_string(str);
|
|
|
|
@ -1429,7 +1429,7 @@ bool Space::has_value(const char * val) const
|
|
|
|
|
{
|
|
|
|
|
for(size_t i=0 ; i < value.value_table.size() ; ++i)
|
|
|
|
|
{
|
|
|
|
|
PT::Space * table_item = value.value_table[i];
|
|
|
|
|
Space * table_item = value.value_table[i];
|
|
|
|
|
|
|
|
|
|
if( table_item->type == type_string )
|
|
|
|
|
{
|
|
|
|
@ -1459,7 +1459,7 @@ bool Space::has_value(const wchar_t * val) const
|
|
|
|
|
{
|
|
|
|
|
for(size_t i=0 ; i < value.value_table.size() ; ++i)
|
|
|
|
|
{
|
|
|
|
|
PT::Space * table_item = value.value_table[i];
|
|
|
|
|
Space * table_item = value.value_table[i];
|
|
|
|
|
|
|
|
|
|
if( table_item->type == type_wstring )
|
|
|
|
|
{
|
|
|
|
@ -1934,7 +1934,7 @@ void Space::remove_child_space(const wchar_t * name)
|
|
|
|
|
{
|
|
|
|
|
for(size_t i=0 ; i<child_spaces->size() ; )
|
|
|
|
|
{
|
|
|
|
|
PT::Space * child = (*child_spaces)[i];
|
|
|
|
|
Space * child = (*child_spaces)[i];
|
|
|
|
|
|
|
|
|
|
if( child->name && (*child->name) == name )
|
|
|
|
|
{
|
|
|
|
@ -1960,7 +1960,7 @@ void Space::remove_child_space(size_t index)
|
|
|
|
|
{
|
|
|
|
|
if( child_spaces && index < child_spaces->size() )
|
|
|
|
|
{
|
|
|
|
|
PT::Space * child = (*child_spaces)[index];
|
|
|
|
|
Space * child = (*child_spaces)[index];
|
|
|
|
|
delete child;
|
|
|
|
|
child = nullptr;
|
|
|
|
|
|
|
|
|
|