ScummVM API documentation
Ultima::Ultima8::ConfigFileManager Class Reference

Classes

struct  ConfigFile
 

Public Member Functions

bool readConfigFile (const Common::Path &fname, const Common::String &category)
 
void clear ()
 clear everything
 
void clearRoot (const Common::String &category)
 clear everything in a root
 
bool get (const Common::String &category, const Common::String &section, const Common::String &key, Common::String &ret) const
 get value
 
bool get (const Common::String &category, const Common::String &section, const Common::String &key, int &ret) const
 get value
 
bool get (const Common::String &category, const Common::String &section, const Common::String &key, bool &ret) const
 get value
 
Common::Array< Common::StringlistSections (const Common::String &category) const
 
KeyMap listKeyValues (const Common::String &category, const Common::String &section) const
 

Static Public Member Functions

static ConfigFileManagerget_instance ()
 

Member Function Documentation

◆ readConfigFile()

bool Ultima::Ultima8::ConfigFileManager::readConfigFile ( const Common::Path fname,
const Common::String category 
)

read a config file. Multiple files may be read. Order is important.

Parameters
fnameThe file to read
rootThe name of the root node in the file
readonlyIf true, don't write to this file's tree (or the file)
Returns
true if successful

◆ listSections()

Common::Array<Common::String> Ultima::Ultima8::ConfigFileManager::listSections ( const Common::String category) const

list all sections

Parameters
categoryThe config category to list all sections in
Returns
the sections. They have no guaranteed order.

◆ listKeyValues()

KeyMap Ultima::Ultima8::ConfigFileManager::listKeyValues ( const Common::String category,
const Common::String section 
) const

list all key-value pairs in the given section.

Parameters
categoryThe config category for the section to list
sectionThe section to list
Returns
the key-value pairs. They have no guaranteed order.

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