pandemonium_engine/modules/database/database_manager.h

34 lines
528 B
C++
Raw Normal View History

#ifndef DATABASE_MANAGER_H
#define DATABASE_MANAGER_H
2022-07-05 23:30:14 +02:00
#include "core/reference.h"
#include "core/ustring.h"
#include "core/object.h"
2022-07-05 23:30:14 +02:00
class Database;
class DatabaseManager : public Object {
2022-07-05 23:30:14 +02:00
GDCLASS(DatabaseManager, Object);
public:
2022-07-05 23:30:14 +02:00
Ref<Database> get_ddb();
void set_ddb(const Ref<Database> &db);
2022-07-05 23:30:14 +02:00
void load();
2022-07-05 23:30:14 +02:00
static DatabaseManager *get_singleton();
2022-07-05 23:30:14 +02:00
DatabaseManager();
~DatabaseManager();
2022-07-05 23:30:14 +02:00
protected:
Vector<Ref<Database>> _databases;
Ref<Database> _ddb;
private:
2022-07-05 23:30:14 +02:00
static DatabaseManager *_instance;
};
2022-07-05 23:30:14 +02:00
#endif