mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Made destructors virtual
This commit is contained in:
@ -6,6 +6,10 @@ namespace NSJSON
|
||||
{
|
||||
}
|
||||
|
||||
IBaseValue::~IBaseValue()
|
||||
{
|
||||
}
|
||||
|
||||
void IBaseValue::setNull()
|
||||
{
|
||||
m_type = vtNull;
|
||||
@ -155,6 +159,14 @@ namespace NSJSON
|
||||
}
|
||||
}
|
||||
|
||||
CObject::CObject()
|
||||
{
|
||||
}
|
||||
|
||||
CObject::~CObject()
|
||||
{
|
||||
}
|
||||
|
||||
void CObject::addMember(const IBaseValue* pValue, const std::string& name)
|
||||
{
|
||||
if (m_type != vtObject)
|
||||
|
||||
@ -25,6 +25,7 @@ namespace NSJSON
|
||||
|
||||
public:
|
||||
IBaseValue();
|
||||
virtual ~IBaseValue();
|
||||
|
||||
protected:
|
||||
ValueType m_type;
|
||||
@ -45,7 +46,7 @@ namespace NSJSON
|
||||
CValue(CValue&& other) = delete;
|
||||
// TODO: move constructor and assignment operator ???
|
||||
// TODO: constructors from value ???
|
||||
~CValue();
|
||||
virtual ~CValue();
|
||||
|
||||
CValue& operator=(const CValue& other);
|
||||
CValue& operator=(CValue&& other) = delete;
|
||||
@ -79,6 +80,10 @@ namespace NSJSON
|
||||
// extend this class to make custom objects serializable to JS
|
||||
class JS_DECL CObject : public IBaseValue
|
||||
{
|
||||
public:
|
||||
CObject();
|
||||
virtual ~CObject();
|
||||
|
||||
public:
|
||||
// Add member to JS object when it will be serialized
|
||||
void addMember(const IBaseValue* pValue, const std::string& name);
|
||||
|
||||
Reference in New Issue
Block a user