Minetest  5.4.0
MapDatabase Class Referenceabstract

#include <database.h>

+ Inheritance diagram for MapDatabase:
+ Collaboration diagram for MapDatabase:

Public Member Functions

virtual ~MapDatabase ()=default
 
virtual bool saveBlock (const v3s16 &pos, const std::string &data)=0
 
virtual void loadBlock (const v3s16 &pos, std::string *block)=0
 
virtual bool deleteBlock (const v3s16 &pos)=0
 
virtual void listAllLoadableBlocks (std::vector< v3s16 > &dst)=0
 
- Public Member Functions inherited from Database
virtual void beginSave ()=0
 
virtual void endSave ()=0
 
virtual bool initialized () const
 

Static Public Member Functions

static s64 getBlockAsInteger (const v3s16 &pos)
 
static v3s16 getIntegerAsBlock (s64 i)
 

Constructor & Destructor Documentation

◆ ~MapDatabase()

virtual MapDatabase::~MapDatabase ( )
virtualdefault

Member Function Documentation

◆ deleteBlock()

virtual bool MapDatabase::deleteBlock ( const v3s16 pos)
pure virtual

Implemented in MapDatabaseSQLite3, Database_Redis, MapDatabasePostgreSQL, Database_LevelDB, and Database_Dummy.

Referenced by ServerMap::deleteBlock().

+ Here is the caller graph for this function:

◆ getBlockAsInteger()

s64 MapDatabase::getBlockAsInteger ( const v3s16 pos)
static

◆ getIntegerAsBlock()

v3s16 MapDatabase::getIntegerAsBlock ( s64  i)
static

References pythonmodulo(), and unsigned_to_signed().

Referenced by Database_Dummy::listAllLoadableBlocks(), Database_LevelDB::listAllLoadableBlocks(), Database_Redis::listAllLoadableBlocks(), and MapDatabaseSQLite3::listAllLoadableBlocks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listAllLoadableBlocks()

virtual void MapDatabase::listAllLoadableBlocks ( std::vector< v3s16 > &  dst)
pure virtual

Implemented in MapDatabaseSQLite3, Database_Redis, MapDatabasePostgreSQL, Database_LevelDB, and Database_Dummy.

Referenced by ServerMap::listAllLoadableBlocks(), and migrate_map_database().

+ Here is the caller graph for this function:

◆ loadBlock()

virtual void MapDatabase::loadBlock ( const v3s16 pos,
std::string *  block 
)
pure virtual

Implemented in MapDatabaseSQLite3, Database_Redis, MapDatabasePostgreSQL, Database_LevelDB, and Database_Dummy.

Referenced by ServerMap::loadBlock(), and migrate_map_database().

+ Here is the caller graph for this function:

◆ saveBlock()

virtual bool MapDatabase::saveBlock ( const v3s16 pos,
const std::string &  data 
)
pure virtual

Implemented in MapDatabaseSQLite3, Database_Redis, MapDatabasePostgreSQL, Database_LevelDB, and Database_Dummy.

Referenced by ServerMap::saveBlock().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: