#ifndef DATABASE_MANAGER_H #define DATABASE_MANAGER_H #include "core/reference.h" #include "core/ustring.h" #include "core/vector.h" #include "core/object.h" class Database; class DatabaseManager : public Object { GDCLASS(DatabaseManager, Object); public: //ddb = default database Ref get_ddb(); void set_ddb(const Ref &db); void add_database(const Ref &db, bool set_as_default = true); void remove_database(const int index, const bool unset_if_default = true); Ref get_database(const int index); int get_database_count(); Vector> get_databases(); Vector get_databases_bind(); void load(); void migrate(const bool p_clear, const bool p_should_seed, const int p_seed); static DatabaseManager *get_singleton(); DatabaseManager(); ~DatabaseManager(); protected: Vector> _databases; Ref _ddb; private: static void _bind_methods(); static DatabaseManager *_instance; }; #endif