#include <database-leveldb.h>
◆ PlayerDatabaseLevelDB()
PlayerDatabaseLevelDB::PlayerDatabaseLevelDB |
( |
const std::string & | savedir | ) |
|
◆ ~PlayerDatabaseLevelDB()
PlayerDatabaseLevelDB::~PlayerDatabaseLevelDB |
( |
| ) |
|
|
default |
◆ listPlayers()
void PlayerDatabaseLevelDB::listPlayers |
( |
std::vector< std::string > & | res | ) |
|
|
virtual |
◆ loadPlayer()
Implements PlayerDatabase.
References Inventory::deSerialize(), deSerializeString16(), deSerializeString32(), errorstream, PlayerSAO::getMeta(), Player::getName(), Player::inventory, m_database, readF32(), readU16(), readU32(), readU8(), readV3F32(), PlayerSAO::setBasePosition(), PlayerSAO::setBreath(), PlayerSAO::setHPRaw(), PlayerSAO::setLookPitch(), SimpleMetadata::setModified(), PlayerSAO::setPlayerYaw(), SimpleMetadata::setString(), and BaseException::what().
◆ removePlayer()
bool PlayerDatabaseLevelDB::removePlayer |
( |
const std::string & | name | ) |
|
|
virtual |
◆ savePlayer()
void PlayerDatabaseLevelDB::savePlayer |
( |
RemotePlayer * | player | ) |
|
|
virtual |
Implements PlayerDatabase.
References ENSURE_STATUS_OK, ServerActiveObject::getBasePosition(), PlayerSAO::getBreath(), UnitSAO::getHP(), PlayerSAO::getLookPitch(), PlayerSAO::getMeta(), Player::getName(), RemotePlayer::getPlayerSAO(), UnitSAO::getRotation(), SimpleMetadata::getStrings(), Player::inventory, m_database, RemotePlayer::onSuccessfulSave(), sanity_check, Inventory::serialize(), serializeString16(), serializeString32(), writeF32(), writeU16(), writeU32(), writeU8(), and writeV3F32().
◆ m_database
std::unique_ptr<leveldb::DB> PlayerDatabaseLevelDB::m_database |
|
private |
The documentation for this class was generated from the following files: