]> git.lizzy.rs Git - minetest.git/blobdiff - src/database-leveldb.h
Isolate irrlicht references and use a singleton (#6041)
[minetest.git] / src / database-leveldb.h
index 4afe2fdc727bc3261803a2b971a788c63b18bcc5..1a51f98b6147e2cb6f66268fe11c1cb722cf8371 100644 (file)
@@ -24,20 +24,23 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #if USE_LEVELDB
 
+#include <string>
 #include "database.h"
 #include "leveldb/db.h"
-#include <string>
 
-class Database_LevelDB : public Database
+class Database_LevelDB : public MapDatabase
 {
 public:
        Database_LevelDB(const std::string &savedir);
        ~Database_LevelDB();
 
-       virtual bool saveBlock(const v3s16 &pos, const std::string &data);
-       virtual std::string loadBlock(const v3s16 &pos);
-       virtual bool deleteBlock(const v3s16 &pos);
-       virtual void listAllLoadableBlocks(std::vector<v3s16> &dst);
+       bool saveBlock(const v3s16 &pos, const std::string &data);
+       void loadBlock(const v3s16 &pos, std::string *block);
+       bool deleteBlock(const v3s16 &pos);
+       void listAllLoadableBlocks(std::vector<v3s16> &dst);
+
+       void beginSave() {}
+       void endSave() {}
 
 private:
        leveldb::DB *m_database;
@@ -46,4 +49,3 @@ class Database_LevelDB : public Database
 #endif // USE_LEVELDB
 
 #endif
-