namespace PT renamed to pt
This commit is contained in:
@@ -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;
|
||||
|
||||
|
@@ -50,7 +50,7 @@
|
||||
|
||||
|
||||
|
||||
namespace PT
|
||||
namespace pt
|
||||
{
|
||||
|
||||
|
||||
@@ -915,7 +915,7 @@ protected:
|
||||
wchar_t buffer[50];
|
||||
size_t buffer_len = sizeof(buffer) / sizeof(wchar_t);
|
||||
|
||||
PT::Toa(value.value_long, buffer, buffer_len);
|
||||
Toa(value.value_long, buffer, buffer_len);
|
||||
serialize_string_buffer(buffer, str, Escape::escape_space);
|
||||
}
|
||||
|
||||
@@ -1095,7 +1095,7 @@ protected:
|
||||
wchar_t buffer[50];
|
||||
size_t buffer_len = sizeof(buffer) / sizeof(wchar_t);
|
||||
|
||||
PT::Toa(value.value_long, buffer, buffer_len);
|
||||
Toa(value.value_long, buffer, buffer_len);
|
||||
serialize_string_buffer(buffer, str, Escape::escape_json);
|
||||
}
|
||||
|
||||
|
@@ -42,7 +42,7 @@
|
||||
#include "convert/strtoint.h"
|
||||
|
||||
|
||||
namespace PT
|
||||
namespace pt
|
||||
{
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ SpaceParser::Status SpaceParser::ParseJSONFile(const wchar_t * file_name)
|
||||
{
|
||||
std::string file_name_utf8;
|
||||
|
||||
PT::WideToUTF8(file_name, file_name_utf8);
|
||||
WideToUTF8(file_name, file_name_utf8);
|
||||
return ParseJSONFile(file_name_utf8.c_str());
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ SpaceParser::Status SpaceParser::ParseSpaceFile(const wchar_t * file_name)
|
||||
{
|
||||
std::string file_name_utf8;
|
||||
|
||||
PT::WideToUTF8(file_name, file_name_utf8);
|
||||
WideToUTF8(file_name, file_name_utf8);
|
||||
return ParseSpaceFile(file_name_utf8.c_str());
|
||||
}
|
||||
|
||||
@@ -972,7 +972,7 @@ bool correct;
|
||||
|
||||
do
|
||||
{
|
||||
PT::UTF8ToInt(file, c, correct);
|
||||
UTF8ToInt(file, c, correct);
|
||||
|
||||
if( !file )
|
||||
return lastc;
|
||||
@@ -1025,7 +1025,7 @@ bool correct;
|
||||
|
||||
do
|
||||
{
|
||||
size_t len = PT::UTF8ToInt(pchar_ascii, c, correct);
|
||||
size_t len = UTF8ToInt(pchar_ascii, c, correct);
|
||||
pchar_ascii += len;
|
||||
}
|
||||
while( *pchar_ascii && !correct );
|
||||
|
@@ -43,7 +43,7 @@
|
||||
|
||||
|
||||
|
||||
namespace PT
|
||||
namespace pt
|
||||
{
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user