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

#include <database-leveldb.h>

+ Inheritance diagram for PlayerDatabaseLevelDB:
+ Collaboration diagram for PlayerDatabaseLevelDB:

Public Member Functions

 PlayerDatabaseLevelDB (const std::string &savedir)
 
 ~PlayerDatabaseLevelDB ()=default
 
void savePlayer (RemotePlayer *player)
 
bool loadPlayer (RemotePlayer *player, PlayerSAO *sao)
 
bool removePlayer (const std::string &name)
 
void listPlayers (std::vector< std::string > &res)
 
- Public Member Functions inherited from PlayerDatabase
virtual ~PlayerDatabase ()=default
 

Private Attributes

std::unique_ptr< leveldb::DB > m_database
 

Constructor & Destructor Documentation

◆ PlayerDatabaseLevelDB()

PlayerDatabaseLevelDB::PlayerDatabaseLevelDB ( const std::string & savedir)

◆ ~PlayerDatabaseLevelDB()

PlayerDatabaseLevelDB::~PlayerDatabaseLevelDB ( )
default

Member Function Documentation

◆ listPlayers()

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

Implements PlayerDatabase.

References m_database.

◆ loadPlayer()

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

◆ removePlayer()

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

Implements PlayerDatabase.

References m_database.

◆ savePlayer()

Member Data Documentation

◆ m_database

std::unique_ptr<leveldb::DB> PlayerDatabaseLevelDB::m_database
private

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