finally, first working prototype

This commit is contained in:
Blue 2022-09-15 01:18:31 +03:00
parent d67a3c32eb
commit 5f90a21fe6
Signed by: blue
GPG key ID: 9B203B252A63EE38
11 changed files with 193 additions and 112 deletions

View file

@ -25,8 +25,6 @@
#include <QDir>
#include <lmdb.h>
namespace Core {
class DataBase
{
class _Table;
@ -63,6 +61,17 @@ private:
std::map<std::string, _Table*> tables;
};
#include "exceptions.h"
template <class K, class V>
DataBase::Table<K, V>* DataBase::addTable(const QString& p_name) {
std::string nm = p_name.toStdString();
if (opened) {
throw Opened(name, nm);
}
DataBase::Table<K, V>* table = new DataBase::Table<K, V>(nm, this);
tables.insert(std::make_pair(nm, (_Table*)table));
return table;
}
#endif // CORE_DATABASE_H