EHS/include/ehs/json/JsonObj.h
Karutoh bcd71cf2b5
All checks were successful
Build & Release / Windows-AMD64-Build (push) Successful in 1m8s
Build & Release / Linux-AMD64-Build (push) Successful in 1m30s
Build & Release / Linux-AARCH64-Build (push) Successful in 3m21s
Adjusted workflow.
2024-02-05 22:25:30 -08:00

63 lines
1.0 KiB
C++

#pragma once
#include "ehs/EHS.h"
#include "ehs/Str.h"
#include "JsonBase.h"
namespace ehs
{
class JsonVar;
class JsonObj : public JsonBase
{
protected:
UInt_64 size;
UInt_64 extra;
UInt_64 rawSize;
JsonVar* vars;
public:
virtual ~JsonObj();
JsonObj();
JsonObj(const UInt_64 size, const UInt_64 extra);
JsonObj(const UInt_64 extra);
JsonObj(JsonObj&& value) noexcept;
JsonObj(const JsonObj& value);
JsonObj& operator=(JsonObj&& value) noexcept;
JsonObj& operator=(const JsonObj& value);
operator const JsonVar*() const;
operator JsonVar*();
UInt_64 Size() const;
UInt_64 Extra() const;
UInt_64 RawSize() const;
bool HasVar(const UInt_64 hashId) const;
bool HasVar(const Str_8& identifier) const;
bool AddVar(const JsonVar& var);
const JsonVar* GetVar(const UInt_64 hashId) const;
const JsonVar* GetVar(const Str_8& identifier) const;
JsonVar* GetVar(const UInt_64 hashId);
JsonVar* GetVar(const Str_8& identifier);
Str_8 ToStr(const UInt_64 level, const bool compact) const;
};
}