#pragma once #include "ehs/Array.h" #include "DbVar.h" namespace ehs { class DbTable; class DbObject { private: friend class DbTable; friend class DbVar; UInt_64 id; DbTable* parent; Array vars; public: DbObject(); DbObject(UInt_64 id); DbObject(DbObject&& obj) noexcept; DbObject(const DbObject& obj); DbObject& operator=(DbObject&& obj) noexcept; DbObject& operator=(const DbObject& obj); UInt_64 GetId() const; bool HasVariable(UInt_64 hashId) const; DbVar* GetVariable(UInt_64 hashId) const; DbVar* GetVariable(const Str_8& id) const; void Save() const; void Load(); bool IsLoaded() const; void Free(); private: void CreateVariable(DbVarTmpl* master); }; }