Minetest 5.9.0-dev
 
Loading...
Searching...
No Matches
SimpleMetadata Class Reference

#include <metadata.h>

+ Inheritance diagram for SimpleMetadata:
+ Collaboration diagram for SimpleMetadata:

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 StringMapgetStrings (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 StringMapgetStrings () const
 
bool isModified () const
 
void setModified (bool v)
 

Protected Member Functions

const std::string * getStringRaw (const std::string &name, std::string *) const override final
 
virtual const std::string * getStringRaw (const std::string &name, std::string *place) const =0
 

Protected Attributes

StringMap m_stringvars
 

Private Attributes

bool m_modified = false
 

Constructor & Destructor Documentation

◆ ~SimpleMetadata()

virtual SimpleMetadata::~SimpleMetadata ( )
virtualdefault

Member Function Documentation

◆ clear()

void SimpleMetadata::clear ( )
overridevirtual

Implements IMetadata.

Reimplemented in NodeMetadata, and ItemStackMetadata.

References m_modified, and m_stringvars.

Referenced by NodeMetadata::clear(), and ItemStackMetadata::clear().

+ Here is the caller graph for this function:

◆ contains()

bool SimpleMetadata::contains ( const std::string &  name) const
overridevirtual

Implements IMetadata.

References m_stringvars.

Referenced by ItemStackMetadata::updateToolCapabilities(), and ItemStackMetadata::updateWearBarParams().

+ Here is the caller graph for this function:

◆ empty()

bool SimpleMetadata::empty ( ) const
virtual

Reimplemented in NodeMetadata.

References m_stringvars.

Referenced by NodeMetadata::empty(), and ItemStack::serialize().

+ Here is the caller graph for this function:

◆ getKeys()

const std::vector< std::string > & SimpleMetadata::getKeys ( std::vector< std::string > *  place) const
finaloverridevirtual

Implements IMetadata.

References m_stringvars.

◆ getString()

const std::string & SimpleMetadata::getString ( const std::string &  name,
u16  recursion = 0 
) const
inline

◆ getStringRaw()

const std::string * SimpleMetadata::getStringRaw ( const std::string &  name,
std::string *   
) const
finaloverrideprotectedvirtual

Implements IMetadata.

References m_stringvars.

◆ getStrings() [1/2]

const StringMap & SimpleMetadata::getStrings ( ) const
inline

References getStrings().

Referenced by getStrings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getStrings() [2/2]

const StringMap & SimpleMetadata::getStrings ( StringMap ) const
finaloverridevirtual

Implements IMetadata.

References m_stringvars.

Referenced by LuaItemStack::l_to_table(), PlayerDatabaseLevelDB::savePlayer(), PlayerDatabaseSQLite3::savePlayer(), and PlayerDatabaseFiles::serialize().

+ Here is the caller graph for this function:

◆ isModified()

bool SimpleMetadata::isModified ( ) const
inline

References m_modified.

◆ resolveString()

const std::string & SimpleMetadata::resolveString ( const std::string &  str,
u16  recursion = 0 
) const
inline

References IMetadata::resolveString().

Referenced by NodeMetadataFormSource::resolveText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setModified()

void SimpleMetadata::setModified ( bool  v)
inline

References m_modified.

Referenced by PlayerDatabaseFiles::deSerialize(), PlayerDatabaseLevelDB::loadPlayer(), PlayerDatabaseSQLite3::loadPlayer(), and RemotePlayer::onSuccessfulSave().

+ Here is the caller graph for this function:

◆ setString()

bool SimpleMetadata::setString ( const std::string &  name,
std::string_view  var 
)
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().

+ Here is the caller graph for this function:

◆ size()

size_t SimpleMetadata::size ( ) const

References m_stringvars.

Referenced by ItemStack::serialize().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_modified

bool SimpleMetadata::m_modified = false
private

◆ m_stringvars


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