Cleaned up and fixed some errors in the Json Parser.

This commit is contained in:
2024-08-15 19:28:30 -07:00
parent 2e705627ac
commit c607b20bad
14 changed files with 241 additions and 253 deletions

View File

@@ -9,7 +9,7 @@ namespace ehs
{
class JsonVar;
class EHS_LIB_IO JsonObj : public JsonBase
class EHS_LIB_IO JsonObj final : public JsonBase
{
protected:
UInt_64 size;
@@ -18,25 +18,23 @@ namespace ehs
JsonVar* vars;
public:
virtual ~JsonObj();
~JsonObj() override;
JsonObj();
JsonObj(const UInt_64 size, const UInt_64 extra);
JsonObj(UInt_64 size, UInt_64 extra);
JsonObj(const UInt_64 extra);
JsonObj(UInt_64 extra);
JsonObj(JsonObj&& value) noexcept;
JsonObj(JsonObj &&value) noexcept;
JsonObj(const JsonObj& value);
JsonObj(const JsonObj &value);
JsonObj& operator=(JsonObj&& value) noexcept;
JsonObj& operator=(JsonObj &&value) noexcept;
JsonObj& operator=(const JsonObj& value);
JsonObj& operator=(const JsonObj &value);
operator const JsonVar*() const;
operator JsonVar*();
operator JsonVar *() const;
UInt_64 Size() const;
@@ -44,20 +42,20 @@ namespace ehs
UInt_64 RawSize() const;
bool HasVar(const UInt_64 hashId) const;
bool HasVar(UInt_64 hashId) const;
bool HasVar(const Str_8& identifier) const;
bool HasVar(const Str_8 &identifier) const;
bool AddVar(const JsonVar& var);
bool AddVar(const JsonVar &var);
const JsonVar* GetVar(const UInt_64 hashId) const;
const JsonVar *GetVar(UInt_64 hashId) const;
const JsonVar* GetVar(const Str_8& identifier) const;
const JsonVar *GetVar(const Str_8& identifier) const;
JsonVar* GetVar(const UInt_64 hashId);
JsonVar *GetVar(UInt_64 hashId);
JsonVar* GetVar(const Str_8& identifier);
JsonVar *GetVar(const Str_8& identifier);
Str_8 ToStr(const UInt_64 level, const bool compact) const;
Str_8 ToStr(UInt_64 level, bool compact) const override;
};
}