Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
Database_Dummy Class Reference

#include <database-dummy.h>

+ Inheritance diagram for Database_Dummy:
+ Collaboration diagram for Database_Dummy:

Public Member Functions

bool saveBlock (const v3s16 &pos, std::string_view data)
 
void loadBlock (const v3s16 &pos, std::string *block)
 
bool deleteBlock (const v3s16 &pos)
 
void listAllLoadableBlocks (std::vector< v3s16 > &dst)
 
void savePlayer (RemotePlayer *player)
 
bool loadPlayer (RemotePlayer *player, PlayerSAO *sao)
 
bool removePlayer (const std::string &name)
 
void listPlayers (std::vector< std::string > &res)
 
void getModEntries (const std::string &modname, StringMap *storage)
 
void getModKeys (const std::string &modname, std::vector< std::string > *storage)
 
bool getModEntry (const std::string &modname, const std::string &key, std::string *value)
 
bool hasModEntry (const std::string &modname, const std::string &key)
 
bool setModEntry (const std::string &modname, const std::string &key, std::string_view value)
 
bool removeModEntry (const std::string &modname, const std::string &key)
 
bool removeModEntries (const std::string &modname)
 
void listMods (std::vector< std::string > *res)
 
void beginSave ()
 
void endSave ()
 
- Public Member Functions inherited from MapDatabase
virtual ~MapDatabase ()=default
 
- Public Member Functions inherited from Database
virtual bool initialized () const
 
- Public Member Functions inherited from PlayerDatabase
virtual ~PlayerDatabase ()=default
 
- Public Member Functions inherited from ModStorageDatabase
virtual ~ModStorageDatabase ()=default
 

Private Attributes

std::map< s64, std::string > m_database
 
std::set< std::string > m_player_database
 
std::unordered_map< std::string, StringMapm_mod_storage_database
 

Additional Inherited Members

- Static Public Member Functions inherited from MapDatabase
static s64 getBlockAsInteger (const v3s16 &pos)
 
static v3s16 getIntegerAsBlock (s64 i)
 

Member Function Documentation

◆ beginSave()

void Database_Dummy::beginSave ( )
inlinevirtual

Implements Database.

◆ deleteBlock()

bool Database_Dummy::deleteBlock ( const v3s16 & pos)
virtual

Implements MapDatabase.

References MapDatabase::getBlockAsInteger(), and m_database.

+ Here is the call graph for this function:

◆ endSave()

void Database_Dummy::endSave ( )
inlinevirtual

Implements Database.

◆ getModEntries()

void Database_Dummy::getModEntries ( const std::string & modname,
StringMap * storage )
virtual

Implements ModStorageDatabase.

References m_mod_storage_database.

◆ getModEntry()

bool Database_Dummy::getModEntry ( const std::string & modname,
const std::string & key,
std::string * value )
virtual

Implements ModStorageDatabase.

References m_mod_storage_database.

◆ getModKeys()

void Database_Dummy::getModKeys ( const std::string & modname,
std::vector< std::string > * storage )
virtual

Implements ModStorageDatabase.

References m_mod_storage_database.

◆ hasModEntry()

bool Database_Dummy::hasModEntry ( const std::string & modname,
const std::string & key )
virtual

Implements ModStorageDatabase.

References m_mod_storage_database.

◆ listAllLoadableBlocks()

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

Implements MapDatabase.

References MapDatabase::getIntegerAsBlock(), and m_database.

+ Here is the call graph for this function:

◆ listMods()

void Database_Dummy::listMods ( std::vector< std::string > * res)
virtual

Implements ModStorageDatabase.

References m_mod_storage_database.

◆ listPlayers()

void Database_Dummy::listPlayers ( std::vector< std::string > & res)
virtual

Implements PlayerDatabase.

References m_player_database.

◆ loadBlock()

void Database_Dummy::loadBlock ( const v3s16 & pos,
std::string * block )
virtual

Implements MapDatabase.

References MapDatabase::getBlockAsInteger(), and m_database.

+ Here is the call graph for this function:

◆ loadPlayer()

bool Database_Dummy::loadPlayer ( RemotePlayer * player,
PlayerSAO * sao )
virtual

Implements PlayerDatabase.

References Player::getName(), and m_player_database.

+ Here is the call graph for this function:

◆ removeModEntries()

bool Database_Dummy::removeModEntries ( const std::string & modname)
virtual

Implements ModStorageDatabase.

References m_mod_storage_database.

◆ removeModEntry()

bool Database_Dummy::removeModEntry ( const std::string & modname,
const std::string & key )
virtual

Implements ModStorageDatabase.

References m_mod_storage_database.

◆ removePlayer()

bool Database_Dummy::removePlayer ( const std::string & name)
virtual

Implements PlayerDatabase.

References m_player_database.

◆ saveBlock()

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

Implements MapDatabase.

References MapDatabase::getBlockAsInteger(), and m_database.

+ Here is the call graph for this function:

◆ savePlayer()

void Database_Dummy::savePlayer ( RemotePlayer * player)
virtual

Implements PlayerDatabase.

References Player::getName(), and m_player_database.

+ Here is the call graph for this function:

◆ setModEntry()

bool Database_Dummy::setModEntry ( const std::string & modname,
const std::string & key,
std::string_view value )
virtual

Implements ModStorageDatabase.

References m_mod_storage_database.

Member Data Documentation

◆ m_database

std::map<s64, std::string> Database_Dummy::m_database
private

◆ m_mod_storage_database

std::unordered_map<std::string, StringMap> Database_Dummy::m_mod_storage_database
private

◆ m_player_database

std::set<std::string> Database_Dummy::m_player_database
private

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