merge some changes from develop branch; modernize and clean-up code; remove support for compiling without POCO_WIN32_UTF8

This commit is contained in:
Günter Obiltschnig
2020-01-09 10:08:09 +01:00
parent 7c177b6f89
commit 1bf40a0cd2
389 changed files with 3029 additions and 4111 deletions

View File

@@ -58,10 +58,10 @@ class JSON_API Array
/// ----
{
public:
typedef std::vector<Dynamic::Var> ValueVec;
typedef std::vector<Dynamic::Var>::iterator Iterator;
typedef std::vector<Dynamic::Var>::const_iterator ConstIterator;
typedef SharedPtr<Array> Ptr;
using ValueVec = std::vector<Dynamic::Var>;
using Iterator = std::vector<Dynamic::Var>::iterator;
using ConstIterator = std::vector<Dynamic::Var>::const_iterator;
using Ptr = SharedPtr<Array>;
Array(int options = 0);
/// Creates an empty Array.
@@ -73,16 +73,12 @@ public:
Array(const Array& copy);
/// Creates an Array by copying another one.
#ifdef POCO_ENABLE_CPP11
Array(Array&& other);
/// Move constructor
Array& operator=(Array&& other);
/// Move assignment operator.
#endif // POCO_ENABLE_CPP11
Array& operator=(const Array& other);
/// Assignment operator.

View File

@@ -36,7 +36,7 @@ class JSON_API Handler
/// parser would handle XML.
{
public:
typedef SharedPtr<Handler> Ptr;
using Ptr = SharedPtr<Handler>;
Handler();
/// Creates an empty Handler.

View File

@@ -60,12 +60,12 @@ class JSON_API Object
///
{
public:
typedef SharedPtr<Object> Ptr;
typedef std::map<std::string, Dynamic::Var> ValueMap;
typedef ValueMap::value_type ValueType;
typedef ValueMap::iterator Iterator;
typedef ValueMap::const_iterator ConstIterator;
typedef std::vector<std::string> NameList;
using Ptr = SharedPtr<Object>;
using ValueMap = std::map<std::string, Dynamic::Var>;
using ValueType = ValueMap::value_type;
using Iterator = ValueMap::iterator;
using ConstIterator = ValueMap::const_iterator;
using NameList = std::vector<std::string>;
explicit Object(int options = 0);
/// Creates an empty Object.
@@ -84,16 +84,12 @@ public:
/// Struct is not copied to keep the operation as
/// efficient as possible (when needed, it will be generated upon request).
#ifdef POCO_ENABLE_CPP11
Object(Object&& other);
/// Move constructor
Object &operator =(Object &&other);
// Move asignment operator
#endif // POCO_ENABLE_CPP11
virtual ~Object();
/// Destroys the Object.
@@ -224,16 +220,12 @@ public:
static Poco::DynamicStruct makeStruct(const Object::Ptr& obj);
/// Utility function for creation of struct.
#ifdef POCO_ENABLE_CPP11
static Poco::OrderedDynamicStruct makeOrderedStruct(const Object::Ptr& obj);
/// Utility function for creation of ordered struct.
operator const Poco::OrderedDynamicStruct& () const;
/// Cast operator to Poco::OrderedDynamiStruct.
#endif // POCO_ENABLE_CPP11
operator const Poco::DynamicStruct& () const;
/// Cast operator to Poco::DynamiStruct.
@@ -245,9 +237,7 @@ public:
private:
typedef std::deque<ValueMap::const_iterator> KeyList;
typedef Poco::DynamicStruct::Ptr StructPtr;
#ifdef POCO_ENABLE_CPP11
typedef Poco::OrderedDynamicStruct::Ptr OrdStructPtr;
#endif // POCO_ENABLE_CPP11
void syncKeys(const KeyList& keys);
@@ -360,9 +350,7 @@ private:
// so it must know whether to escape unicode or not.
bool _escapeUnicode;
mutable StructPtr _pStruct;
#ifdef POCO_ENABLE_CPP11
mutable OrdStructPtr _pOrdStruct;
#endif // POCO_ENABLE_CPP11
mutable bool _modified;
};

View File

@@ -34,7 +34,7 @@ class JSON_API PrintHandler: public Handler
/// otherwise, the proper indentation is applied to elements.
{
public:
typedef SharedPtr<PrintHandler> Ptr;
using Ptr = SharedPtr<PrintHandler>;
static const unsigned JSON_PRINT_FLAT = 0;

View File

@@ -87,7 +87,7 @@ class JSON_API Template
/// A query is passed to Poco::JSON::Query to get the value.
{
public:
typedef SharedPtr<Template> Ptr;
using Ptr = SharedPtr<Template>;
Template();
/// Creates a Template.