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