2014-03-05 12:41:27 -08:00
|
|
|
#ifndef _DB_H
|
|
|
|
#define _DB_H
|
|
|
|
|
2014-03-09 04:32:13 -07:00
|
|
|
#include <stdint.h>
|
2014-03-05 12:41:27 -08:00
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
2014-03-09 04:32:13 -07:00
|
|
|
#include <utility>
|
2014-03-05 12:41:27 -08:00
|
|
|
|
2014-05-06 07:20:22 -07:00
|
|
|
#include "types.h"
|
|
|
|
#include "BlockPos.h"
|
|
|
|
|
2014-03-05 12:41:27 -08:00
|
|
|
|
|
|
|
class DB {
|
|
|
|
public:
|
2014-05-06 07:20:22 -07:00
|
|
|
typedef std::pair<BlockPos, ustring> Block;
|
2014-06-15 01:17:38 -07:00
|
|
|
typedef std::vector<BlockPos> BlockPosList;
|
2014-05-06 07:20:22 -07:00
|
|
|
virtual const BlockPosList &getBlockPos()=0;
|
2014-03-25 16:23:33 -07:00
|
|
|
virtual int getBlocksUnCachedCount(void)=0;
|
|
|
|
virtual int getBlocksCachedCount(void)=0;
|
|
|
|
virtual int getBlocksReadCount(void)=0;
|
2014-05-06 07:20:22 -07:00
|
|
|
virtual Block getBlockOnPos(const BlockPos &pos)=0;
|
2014-03-05 12:41:27 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _DB_H
|