Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
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, std::string_view 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 Database_Dummy, Database_LevelDB, Database_Redis, MapDatabasePostgreSQL, and MapDatabaseSQLite3.

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 Database_Dummy, Database_LevelDB, Database_Redis, MapDatabasePostgreSQL, and MapDatabaseSQLite3.

Referenced by ServerMap::listAllLoadableBlocks(), migrate_map_database(), and recompress_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 Database_Dummy, Database_LevelDB, Database_Redis, MapDatabasePostgreSQL, and MapDatabaseSQLite3.

Referenced by MapDatabaseAccessor::loadBlock(), migrate_map_database(), and recompress_map_database().

+ Here is the caller graph for this function:

◆ saveBlock()

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

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

Referenced by recompress_map_database(), and ServerMap::saveBlock().

+ Here is the caller graph for this function:

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