blob: 40bd01f253b06b2ff8331537b8c2ff0e44a3a7d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#include "config.h"
#if USE_LEVELDB
#ifndef DATABASE_LEVELDB_HEADER
#define DATABASE_LEVELDB_HEADER
#include "map.h"
#include "mapsector.h"
#include "mapblock.h"
#include "main.h"
#include "filesys.h"
#include "database.h"
#include "leveldb/db.h"
class Database_LevelDB : public Database
{
public:
Database_LevelDB(ServerMap *map, std::string savedir);
virtual void beginSave();
virtual void endSave();
virtual void saveBlock(MapBlock *block);
virtual MapBlock* loadBlock(v3s16 blockpos);
virtual void listAllLoadableBlocks(core::list<v3s16> &dst);
virtual int Initialized(void);
~Database_LevelDB();
private:
ServerMap *srvmap;
leveldb::DB* m_database;
};
#endif
#endif
|