minetestmapper/include/db-leveldb.h

22 lines
436 B
C
Raw Normal View History

#ifndef DB_LEVELDB_HEADER
#define DB_LEVELDB_HEADER
2014-03-05 21:41:27 +01:00
#include "db.h"
#include <leveldb/db.h>
class DBLevelDB : public DB {
public:
DBLevelDB(const std::string &mapdir);
virtual std::vector<BlockPos> getBlockPos();
virtual void getBlocksOnZ(std::map<int16_t, BlockList> &blocks, int16_t zPos);
virtual ~DBLevelDB();
2014-03-05 21:41:27 +01:00
private:
void loadPosCache();
std::vector<BlockPos> posCache;
leveldb::DB *db;
2014-03-05 21:41:27 +01:00
};
#endif // DB_LEVELDB_HEADER