mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-20 14:02:38 +02:00
porting JSON to the Dynamic::Var
added to JSON to gmake build
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
|
||||
#include "Poco/JSON/JSON.h"
|
||||
#include "Poco/SharedPtr.h"
|
||||
#include "Poco/DynamicAny.h"
|
||||
#include "Poco/Dynamic/Var.h"
|
||||
|
||||
namespace Poco
|
||||
{
|
||||
@@ -214,15 +214,18 @@ inline void Array::remove(unsigned int index)
|
||||
namespace Poco
|
||||
{
|
||||
|
||||
namespace Dynamic
|
||||
{
|
||||
|
||||
template <>
|
||||
class DynamicAnyHolderImpl<JSON::Array::Ptr>: public DynamicAnyHolder
|
||||
class VarHolderImpl<JSON::Array::Ptr>: public VarHolder
|
||||
{
|
||||
public:
|
||||
DynamicAnyHolderImpl(const JSON::Array::Ptr& val): _val(val)
|
||||
VarHolderImpl(const JSON::Array::Ptr& val): _val(val)
|
||||
{
|
||||
}
|
||||
|
||||
~DynamicAnyHolderImpl()
|
||||
~VarHolderImpl()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -313,9 +316,9 @@ public:
|
||||
throw BadCastException();
|
||||
}
|
||||
|
||||
DynamicAnyHolder* clone() const
|
||||
VarHolder* clone() const
|
||||
{
|
||||
return new DynamicAnyHolderImpl(_val);
|
||||
return new VarHolderImpl(_val);
|
||||
}
|
||||
|
||||
const JSON::Array::Ptr& value() const
|
||||
@@ -352,6 +355,7 @@ private:
|
||||
JSON::Array::Ptr _val;
|
||||
};
|
||||
|
||||
} // Namespace Dynamic
|
||||
} // Namespace Poco
|
||||
|
||||
|
||||
|
@@ -45,7 +45,7 @@
|
||||
#include <sstream>
|
||||
|
||||
#include "Poco/SharedPtr.h"
|
||||
#include "Poco/DynamicAny.h"
|
||||
#include "Poco/Dynamic/Var.h"
|
||||
|
||||
#include "Poco/JSON/JSON.h"
|
||||
#include "Poco/JSON/Array.h"
|
||||
@@ -216,15 +216,18 @@ inline void Object::remove(const std::string& key)
|
||||
namespace Poco
|
||||
{
|
||||
|
||||
namespace Dynamic
|
||||
{
|
||||
|
||||
template <>
|
||||
class DynamicAnyHolderImpl<JSON::Object::Ptr>: public DynamicAnyHolder
|
||||
class VarHolderImpl<JSON::Object::Ptr>: public VarHolder
|
||||
{
|
||||
public:
|
||||
DynamicAnyHolderImpl(const JSON::Object::Ptr& val): _val(val)
|
||||
VarHolderImpl(const JSON::Object::Ptr& val): _val(val)
|
||||
{
|
||||
}
|
||||
|
||||
~DynamicAnyHolderImpl()
|
||||
~VarHolderImpl()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -315,9 +318,9 @@ public:
|
||||
//TODO: ts = _val.timestamp();
|
||||
}
|
||||
|
||||
DynamicAnyHolder* clone() const
|
||||
VarHolderImpl* clone() const
|
||||
{
|
||||
return new DynamicAnyHolderImpl(_val);
|
||||
return new VarHolderImpl(_val);
|
||||
}
|
||||
|
||||
const JSON::Object::Ptr& value() const
|
||||
@@ -354,6 +357,7 @@ private:
|
||||
JSON::Object::Ptr _val;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // JSON_Object_INCLUDED
|
||||
|
Reference in New Issue
Block a user