Database implementation mostly complete.

This commit is contained in:
2024-04-09 01:44:15 -07:00
parent beba947c69
commit d13fe81ac5
20 changed files with 768 additions and 106 deletions

View File

@@ -11,15 +11,17 @@ namespace ehs
{
private:
friend class DbTable;
friend class DbVar;
UInt_64 id;
Array<DbVar> vars;
bool loaded;
DbTable* parent;
Array<DbVar> vars;
public:
DbObject();
DbObject(UInt_64 id);
DbObject(DbObject&& obj) noexcept;
DbObject(const DbObject& obj);
@@ -28,13 +30,13 @@ namespace ehs
DbObject& operator=(const DbObject& obj);
UInt_64 GetId();
UInt_64 GetId() const;
bool HasVariable(UInt_64 hashId);
bool HasVariable(UInt_64 hashId) const;
DbVar* GetVariable(UInt_64 hashId) const;
void Save();
void Save() const;
void Load();
@@ -42,6 +44,7 @@ namespace ehs
void Free();
DbTable* GetParent() const;
private:
void CreateVariable(DbVarTmpl* master);
};
}