#include <metadata.h>
◆ ~Metadata()
virtual Metadata::~Metadata |
( |
| ) |
|
|
virtualdefault |
◆ clear()
◆ contains()
bool Metadata::contains |
( |
const std::string & |
name | ) |
const |
◆ empty()
bool Metadata::empty |
( |
| ) |
const |
|
virtual |
◆ getString()
const std::string & Metadata::getString |
( |
const std::string & |
name, |
|
|
u16 |
recursion = 0 |
|
) |
| const |
References m_stringvars, and resolveString().
Referenced by content_nodemeta_deserialize_legacy_body(), ItemStack::getDescription(), NodeMetadataFormSource::getForm(), CItemDefManager::getItemstackColor(), ItemStack::getShortDescription(), Game::handlePointingAtNode(), MetaDataRef::l_get_float(), MetaDataRef::l_get_int(), LuaItemStack::l_get_metadata(), MetaDataRef::l_get_string(), MetaDataRef::l_set_float(), MetaDataRef::l_set_int(), MetaDataRef::l_set_string(), LuaItemStack::l_to_table(), Game::nodePlacement(), operator==(), resolveString(), Game::updateFrame(), and ItemStackMetadata::updateToolCapabilities().
◆ getStrings()
const StringMap& Metadata::getStrings |
( |
| ) |
const |
|
inline |
◆ getStringToRef()
bool Metadata::getStringToRef |
( |
const std::string & |
name, |
|
|
std::string & |
str, |
|
|
u16 |
recursion = 0 |
|
) |
| const |
◆ isModified()
bool Metadata::isModified |
( |
| ) |
const |
|
inline |
◆ operator!=()
bool Metadata::operator!= |
( |
const Metadata & |
other | ) |
const |
|
inline |
◆ operator==()
bool Metadata::operator== |
( |
const Metadata & |
other | ) |
const |
◆ removeString()
bool Metadata::removeString |
( |
const std::string & |
name | ) |
|
|
inline |
◆ resolveString()
const std::string & Metadata::resolveString |
( |
const std::string & |
str, |
|
|
u16 |
recursion = 0 |
|
) |
| const |
◆ setModified()
void Metadata::setModified |
( |
bool |
v | ) |
|
|
inline |
◆ setString()
bool Metadata::setString |
( |
const std::string & |
name, |
|
|
const std::string & |
var |
|
) |
| |
|
virtual |
Sets var to name key in the metadata storage.
- Parameters
-
- Returns
- true if key-value pair is created or changed
Reimplemented in ItemStackMetadata, and ModMetadata.
References m_modified, and m_stringvars.
Referenced by content_nodemeta_deserialize_legacy_body(), PlayerDatabaseFiles::deSerialize(), MetaDataRef::handleFromTable(), ObjectRef::l_set_attribute(), MetaDataRef::l_set_float(), MetaDataRef::l_set_int(), MetaDataRef::l_set_string(), PlayerDatabaseLevelDB::loadPlayer(), PlayerDatabaseSQLite3::loadPlayer(), removeString(), ModMetadata::setString(), and ItemStackMetadata::setString().
◆ size()
size_t Metadata::size |
( |
| ) |
const |
◆ m_modified
bool Metadata::m_modified = false |
|
private |
◆ m_stringvars
Referenced by clear(), contains(), NodeMetadata::countNonPrivate(), ItemStackMetadata::deSerialize(), NodeMetadata::deSerialize(), empty(), getString(), getStrings(), getStringToRef(), ModMetadata::load(), operator==(), ModMetadata::save(), ItemStackMetadata::serialize(), NodeMetadata::serialize(), setString(), and size().
The documentation for this class was generated from the following files: