INT64_MIN was causing problems ('not declared'), because C99 requires some C++-specific behavior, which C++11 prohibits... Comments from clang's stdint implementation (http://clang.llvm.org/doxygen/stdint_8h_source.html): // C99 7.18.3 Limits of other integer types // // Footnote 219, 220: C++ implementations should define these macros only when // __STDC_LIMIT_MACROS is defined before <stdint.h> is included. // // Footnote 222: C++ implementations should define these macros only when // __STDC_CONSTANT_MACROS is defined before <stdint.h> is included. // // C++11 [cstdint.syn]p2: // // The macros defined by <cstdint> are provided unconditionally. In particular, // the symbols __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS (mentioned in // footnotes 219, 220, and 222 in the C standard) play no role in C++. // // C11 removed the problematic footnotes.
24 lines
461 B
C++
24 lines
461 B
C++
#ifndef _DB_H
|
|
#define _DB_H
|
|
|
|
#include <cstdint>
|
|
#include <vector>
|
|
#include <string>
|
|
#include <utility>
|
|
|
|
#include "types.h"
|
|
#include "BlockPos.h"
|
|
|
|
|
|
class DB {
|
|
public:
|
|
typedef std::pair<BlockPos, ustring> Block;
|
|
typedef std::vector<BlockPos> BlockPosList;
|
|
virtual const BlockPosList &getBlockPos()=0;
|
|
virtual int getBlocksQueriedCount(void)=0;
|
|
virtual int getBlocksReadCount(void)=0;
|
|
virtual Block getBlockOnPos(const BlockPos &pos)=0;
|
|
};
|
|
|
|
#endif // _DB_H
|