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

@@ -12,7 +12,7 @@ namespace ehs
class JsonNum;
class JsonStr;
class EHS_LIB_IO JsonVar
class EHS_LIB_IO JsonVar final
{
private:
UInt_64 hashId;
@@ -20,49 +20,49 @@ namespace ehs
JsonBase* value;
public:
virtual ~JsonVar();
~JsonVar();
JsonVar();
JsonVar(Str_8 id);
JsonVar(Str_8 id, const JsonBase* const value);
JsonVar(Str_8 id, const JsonBase *value);
JsonVar(Str_8 id, const JsonBase& value);
JsonVar(Str_8 id, const JsonBase &value);
JsonVar(Str_8 id, const JsonObj& value);
JsonVar(Str_8 id, const JsonObj &value);
JsonVar(Str_8 id, const JsonArray& value);
JsonVar(Str_8 id, const JsonArray &value);
JsonVar(Str_8 id, const JsonBool& value);
JsonVar(Str_8 id, const JsonBool &value);
JsonVar(Str_8 id, const bool boolean);
JsonVar(Str_8 id, bool boolean);
JsonVar(Str_8 id, const JsonNum& value);
JsonVar(Str_8 id, const JsonNum &value);
JsonVar(Str_8 id, const SInt_64 num);
JsonVar(Str_8 id, SInt_64 num);
JsonVar(Str_8 id, const UInt_64 num);
JsonVar(Str_8 id, UInt_64 num);
JsonVar(Str_8 id, const SInt_32 num);
JsonVar(Str_8 id, SInt_32 num);
JsonVar(Str_8 id, const UInt_32 num);
JsonVar(Str_8 id, UInt_32 num);
JsonVar(Str_8 id, const SInt_16 num);
JsonVar(Str_8 id, SInt_16 num);
JsonVar(Str_8 id, const UInt_16 num);
JsonVar(Str_8 id, UInt_16 num);
JsonVar(Str_8 id, const SInt_8 num);
JsonVar(Str_8 id, SInt_8 num);
JsonVar(Str_8 id, const UInt_8 num);
JsonVar(Str_8 id, UInt_8 num);
JsonVar(Str_8 id, const double num);
JsonVar(Str_8 id, double num);
JsonVar(Str_8 id, const float num);
JsonVar(Str_8 id, float num);
JsonVar(Str_8 id, const JsonStr& value);
JsonVar(Str_8 id, const JsonStr &value);
JsonVar(Str_8 id, const Char_8* str, const UInt_64 size = 0);
JsonVar(Str_8 id, const Char_8 *str, UInt_64 size = 0);
JsonVar(Str_8 id, Str_8 str);
@@ -78,25 +78,25 @@ namespace ehs
Str_8 GetId() const;
void SetValue(const JsonBase* const newValue);
void SetValue(const JsonBase *newValue);
void SetValue(const JsonBase& newValue);
void SetValue(const JsonBase &newValue);
void SetValue(const JsonObj& newValue);
void SetValue(const JsonObj &newValue);
void SetValue(const JsonArray& newValue);
void SetValue(const JsonArray &newValue);
void SetValue(const JsonBool& newValue);
void SetValue(const JsonBool &newValue);
void SetValue(const bool newValue);
void SetValue(bool newValue);
void SetValue(const JsonNum& newValue);
void SetValue(const float newValue);
void SetValue(float newValue);
void SetValue(const JsonStr& newValue);
void SetValue(const Char_8* newValue, const UInt_64 size = 0);
void SetValue(const Char_8* newValue, UInt_64 size = 0);
void SetValue(const Str_8& newValue);
@@ -104,6 +104,6 @@ namespace ehs
JsonBase* GetValue();
Str_8 ToStr(const UInt_64 level, const bool compact) const;
Str_8 ToStr(UInt_64 level, bool compact) const;
};
}