Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
IMetadata Class Referenceabstract

#include <metadata.h>

+ Inheritance diagram for IMetadata:

Public Member Functions

virtual ~IMetadata ()=default
 
virtual void clear ()=0
 
bool operator== (const IMetadata &other) const
 
bool operator!= (const IMetadata &other) const
 
virtual bool contains (const std::string &name) const =0
 
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
 
virtual bool setString (const std::string &name, std::string_view var)=0
 
bool removeString (const std::string &name)
 
virtual const StringMapgetStrings (StringMap *place) const =0
 
virtual const std::vector< std::string > & getKeys (std::vector< std::string > *place) const =0
 
const std::string & resolveString (const std::string &str, std::string *place, u16 recursion=0, bool deprecated=false) const
 

Protected Member Functions

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

Constructor & Destructor Documentation

◆ ~IMetadata()

virtual IMetadata::~IMetadata ( )
virtualdefault

Member Function Documentation

◆ clear()

virtual void IMetadata::clear ( )
pure virtual

◆ contains()

virtual bool IMetadata::contains ( const std::string & name) const
pure virtual

Implemented in ModStorage, and SimpleMetadata.

Referenced by MetaDataRef::l_contains().

+ Here is the caller graph for this function:

◆ getKeys()

virtual const std::vector< std::string > & IMetadata::getKeys ( std::vector< std::string > * place) const
pure virtual

Implemented in ModStorage, and SimpleMetadata.

Referenced by MetaDataRef::l_get_keys().

+ Here is the caller graph for this function:

◆ getString()

const std::string & IMetadata::getString ( const std::string & name,
std::string * place,
u16 recursion = 0 ) const

References getStringRaw(), and resolveString().

Referenced by SimpleMetadata::getString(), MetaDataRef::l_get_float(), MetaDataRef::l_get_int(), MetaDataRef::l_get_string(), and resolveString().

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

◆ getStringRaw()

virtual const std::string * IMetadata::getStringRaw ( const std::string & name,
std::string * place ) const
protectedpure virtual

Implemented in ModStorage, and SimpleMetadata.

Referenced by getString(), and getStringToRef().

+ Here is the caller graph for this function:

◆ getStrings()

virtual const StringMap & IMetadata::getStrings ( StringMap * place) const
pure virtual

Implemented in ModStorage, and SimpleMetadata.

Referenced by MetaDataRef::handleToTable(), and operator==().

+ Here is the caller graph for this function:

◆ getStringToRef()

bool IMetadata::getStringToRef ( const std::string & name,
std::string & str,
u16 recursion = 0 ) const

References getStringRaw(), and resolveString().

Referenced by MetaDataRef::l_get(), and ObjectRef::l_get_attribute().

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

◆ operator!=()

bool IMetadata::operator!= ( const IMetadata & other) const
inline

◆ operator==()

bool IMetadata::operator== ( const IMetadata & other) const

References getStrings().

+ Here is the call graph for this function:

◆ removeString()

bool IMetadata::removeString ( const std::string & name)
inline

References setString().

Referenced by ObjectRef::l_set_attribute().

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

◆ resolveString()

const std::string & IMetadata::resolveString ( const std::string & str,
std::string * place,
u16 recursion = 0,
bool deprecated = false ) const

References getString(), safe_print_string(), str_starts_with(), and warningstream.

Referenced by getString(), getStringToRef(), and SimpleMetadata::resolveString().

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

◆ setString()

virtual bool IMetadata::setString ( const std::string & name,
std::string_view var )
pure virtual

Implemented in ItemStackMetadata, ModStorage, and SimpleMetadata.

Referenced by MetaDataRef::handleFromTable(), MetaDataRef::l_set_float(), MetaDataRef::l_set_int(), MetaDataRef::l_set_string(), and removeString().

+ Here is the caller graph for this function:

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