Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
ModStorage Class Reference

#include <mods.h>

+ Inheritance diagram for ModStorage:
+ Collaboration diagram for ModStorage:

Public Member Functions

 ModStorage ()=delete
 
 ModStorage (const std::string &mod_name, ModStorageDatabase *database)
 
 ~ModStorage ()=default
 
const std::string & getModName () const
 
void clear () override
 
bool contains (const std::string &name) const override
 
bool setString (const std::string &name, std::string_view var) override
 
const StringMapgetStrings (StringMap *place) const override
 
const std::vector< std::string > & getKeys (std::vector< std::string > *place) const override
 

Protected Member Functions

const std::string * getStringRaw (const std::string &name, std::string *place) const override
 

Private Attributes

std::string m_mod_name
 
ModStorageDatabasem_database
 

Constructor & Destructor Documentation

◆ ModStorage() [1/2]

ModStorage::ModStorage ( )
delete

◆ ModStorage() [2/2]

ModStorage::ModStorage ( const std::string & mod_name,
ModStorageDatabase * database )

◆ ~ModStorage()

ModStorage::~ModStorage ( )
default

Member Function Documentation

◆ clear()

void ModStorage::clear ( )
overridevirtual

Implements IMetadata.

References m_database, m_mod_name, and ModStorageDatabase::removeModEntries().

Referenced by StorageRef::clearMeta().

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

◆ contains()

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

Implements IMetadata.

References ModStorageDatabase::hasModEntry(), m_database, and m_mod_name.

+ Here is the call graph for this function:

◆ getKeys()

const std::vector< std::string > & ModStorage::getKeys ( std::vector< std::string > * place) const
overridevirtual

Implements IMetadata.

References ModStorageDatabase::getModKeys(), m_database, and m_mod_name.

+ Here is the call graph for this function:

◆ getModName()

const std::string & ModStorage::getModName ( ) const
inline

References m_mod_name.

◆ getStringRaw()

const std::string * ModStorage::getStringRaw ( const std::string & name,
std::string * place ) const
overrideprotectedvirtual

Implements IMetadata.

References ModStorageDatabase::getModEntry(), m_database, and m_mod_name.

+ Here is the call graph for this function:

◆ getStrings()

const StringMap & ModStorage::getStrings ( StringMap * place) const
overridevirtual

Implements IMetadata.

References ModStorageDatabase::getModEntries(), m_database, and m_mod_name.

+ Here is the call graph for this function:

◆ setString()

bool ModStorage::setString ( const std::string & name,
std::string_view var )
overridevirtual

Implements IMetadata.

References m_database, m_mod_name, ModStorageDatabase::removeModEntry(), and ModStorageDatabase::setModEntry().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_database

ModStorageDatabase* ModStorage::m_database
private

◆ m_mod_name

std::string ModStorage::m_mod_name
private

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