aboutsummaryrefslogtreecommitdiff
path: root/src/database.h
blob: b6d8950baf2002f7348b32c5a5acc022fd9152d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef DATABASE_HEADER
#define DATABASE_HEADER

#include "config.h"
#include "map.h"
#include "mapsector.h"
#include "mapblock.h"
#include "main.h"
#include "filesys.h"
#include "serialization.h"
#include <irrList.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