#include <metadata.h>
Public Member Functions | |
virtual | ~SimpleMetadata ()=default |
virtual void | clear () override |
virtual bool | empty () const |
size_t | size () const |
bool | contains (const std::string &name) const override |
virtual bool | setString (const std::string &name, std::string_view var) override |
const StringMap & | getStrings (StringMap *) const override final |
const std::vector< std::string > & | getKeys (std::vector< std::string > *place) const override final |
const std::string & | getString (const std::string &name, u16 recursion=0) const |
const std::string & | resolveString (const std::string &str, u16 recursion=0) const |
const StringMap & | getStrings () const |
bool | isModified () const |
void | setModified (bool v) |
Public Member Functions inherited from IMetadata | |
virtual | ~IMetadata ()=default |
bool | operator== (const IMetadata &other) const |
bool | operator!= (const IMetadata &other) const |
const std::string & | getString (const std::string &name, std::string *place, u16 recursion=0) const |
bool | getStringToRef (const std::string &name, std::string &str, u16 recursion=0) const |
bool | removeString (const std::string &name) |
const std::string & | resolveString (const std::string &str, std::string *place, u16 recursion=0, bool deprecated=false) const |
Protected Member Functions | |
const std::string * | getStringRaw (const std::string &name, std::string *) const override final |
Protected Attributes | |
StringMap | m_stringvars |
Private Attributes | |
bool | m_modified = false |
|
virtualdefault |
|
overridevirtual |
Implements IMetadata.
Reimplemented in ItemStackMetadata, and NodeMetadata.
References m_modified, and m_stringvars.
Referenced by ItemStackMetadata::clear(), NodeMetadata::clear(), and PlayerMetaRef::clearMeta().
|
overridevirtual |
Implements IMetadata.
References m_stringvars.
Referenced by ItemStackMetadata::updateToolCapabilities(), and ItemStackMetadata::updateWearBarParams().
|
virtual |
Reimplemented in NodeMetadata.
References m_stringvars.
Referenced by NodeMetadata::empty(), and ItemStack::serialize().
|
finaloverridevirtual |
Implements IMetadata.
References m_stringvars.
|
inline |
References IMetadata::getString().
Referenced by content_nodemeta_deserialize_legacy_body(), drawItemStack(), ItemStack::getDescription(), NodeMetadataFormSource::getForm(), ItemStack::getInventoryImage(), ItemStack::getInventoryOverlay(), ItemStack::getShortDescription(), getToolRange(), ItemStack::getWieldImage(), ItemStack::getWieldOverlay(), ItemStack::getWieldScale(), Game::handlePointingAtNode(), LuaItemStack::l_get_metadata(), LuaItemStack::l_to_table(), Game::nodePlacement(), Game::updateFrame(), ItemStackMetadata::updateToolCapabilities(), and ItemStackMetadata::updateWearBarParams().
|
finaloverrideprotectedvirtual |
Implements IMetadata.
References m_stringvars.
|
inline |
References getStrings().
Referenced by getStrings().
Implements IMetadata.
References m_stringvars.
Referenced by LuaItemStack::l_to_table(), PlayerDatabaseLevelDB::savePlayer(), PlayerDatabaseSQLite3::savePlayer(), and PlayerDatabaseFiles::serialize().
|
inline |
References m_modified.
|
inline |
References IMetadata::resolveString().
Referenced by NodeMetadataFormSource::resolveText().
|
inline |
References m_modified.
Referenced by PlayerDatabaseFiles::deSerialize(), PlayerDatabaseLevelDB::loadPlayer(), PlayerDatabaseSQLite3::loadPlayer(), and RemotePlayer::onSuccessfulSave().
|
overridevirtual |
Implements IMetadata.
Reimplemented in ItemStackMetadata.
References m_modified, and m_stringvars.
Referenced by content_nodemeta_deserialize_legacy_body(), PlayerDatabaseFiles::deSerialize(), ObjectRef::l_set_attribute(), PlayerDatabaseLevelDB::loadPlayer(), PlayerDatabaseSQLite3::loadPlayer(), and ItemStackMetadata::setString().
size_t SimpleMetadata::size | ( | ) | const |
References m_stringvars.
Referenced by ItemStack::serialize().
|
private |
Referenced by clear(), isModified(), setModified(), and setString().
|
protected |