minetest-mapper-cpp/db-leveldb.h
Rogier 7c2cf3efa9 Cleanup sqlite3 database code a bit
As tests using --sqlite-cacheworldrow showed a consistently
lower performance than without, this option was effectively
disabled. It is still recognised for compatibility, but
it may be removed some time in the future.
2015-03-10 12:01:55 +01:00

24 lines
507 B
C++

#ifndef _DB_LEVELDB_H
#define _DB_LEVELDB_H
#include "db.h"
#include <leveldb/db.h>
#include <set>
class DBLevelDB : public DB {
public:
DBLevelDB(const std::string &mapdir);
virtual int getBlocksQueriedCount(void);
virtual int getBlocksReadCount(void);
virtual const BlockPosList &getBlockPos();
virtual Block getBlockOnPos(const BlockPos &pos);
~DBLevelDB();
private:
int m_blocksReadCount;
int m_blocksQueriedCount;
leveldb::DB *m_db;
BlockPosList m_blockPosList;
};
#endif // _DB_LEVELDB_H