mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Add dummy and LevelDB database backends
This commit is contained in:
parent
71a8769bb5
commit
58841ef12f
148 changed files with 26766 additions and 242 deletions
28
src/database.h
Normal file
28
src/database.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
#ifndef DATABASE_HEADER
|
||||
#define DATABASE_HEADER
|
||||
|
||||
#include "config.h"
|
||||
#include "map.h"
|
||||
#include "mapsector.h"
|
||||
#include "mapblock.h"
|
||||
#include "main.h"
|
||||
#include "filesys.h"
|
||||
|
||||
class Database;
|
||||
class ServerMap;
|
||||
|
||||
class Database
|
||||
{
|
||||
public:
|
||||
virtual void beginSave()=0;
|
||||
virtual void endSave()=0;
|
||||
|
||||
virtual void saveBlock(MapBlock *block)=0;
|
||||
virtual MapBlock* loadBlock(v3s16 blockpos)=0;
|
||||
long long getBlockAsInteger(const v3s16 pos);
|
||||
v3s16 getIntegerAsBlock(long long i);
|
||||
virtual void listAllLoadableBlocks(core::list<v3s16> &dst)=0;
|
||||
virtual int Initialized(void)=0;
|
||||
virtual ~Database() {};
|
||||
};
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue