mirror of
https://github.com/minetest/minetestmapper.git
synced 2024-12-26 02:40:37 +01:00
22d3e401f8
This also moves database functions and data structures to db.h
22 lines
428 B
C++
22 lines
428 B
C++
#ifndef DB_LEVELDB_HEADER
|
|
#define DB_LEVELDB_HEADER
|
|
|
|
#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);
|
|
~DBLevelDB();
|
|
private:
|
|
void loadPosCache();
|
|
|
|
std::vector<BlockPos> posCache;
|
|
|
|
leveldb::DB *db;
|
|
};
|
|
|
|
#endif // DB_LEVELDB_HEADER
|