ScummVM API documentation
Common::ConfigManager::Domain Class Reference

Public Types

typedef StringMap::const_iterator const_iterator
 

Public Member Functions

const_iterator begin () const
 
const_iterator end () const
 
bool empty () const
 
bool contains (const String &key) const
 
const Stringoperator[] (const String &key) const
 
void setVal (const String &key, const String &value)
 
StringgetOrCreateVal (const String &key)
 
StringgetVal (const String &key)
 
const StringgetVal (const String &key) const
 
const StringgetValOrDefault (const String &key) const
 
bool tryGetVal (const String &key, String &out) const
 
void clear ()
 
void erase (const String &key)
 
void setDomainComment (const String &comment)
 
const StringgetDomainComment () const
 
void setKVComment (const String &key, const String &comment)
 
const StringgetKVComment (const String &key) const
 
bool hasKVComment (const String &key) const
 

Member Function Documentation

◆ begin()

const_iterator Common::ConfigManager::Domain::begin ( ) const
inline

Return the beginning position of configuration entries.

◆ end()

const_iterator Common::ConfigManager::Domain::end ( ) const
inline

Return the ending position of configuration entries.

◆ empty()

bool Common::ConfigManager::Domain::empty ( ) const
inline

Return true if the configuration is empty, i.e. has no [key, value] pairs, and false otherwise.

◆ contains()

bool Common::ConfigManager::Domain::contains ( const String key) const
inline

Check whether the domain contains a key.

◆ operator[]()

const String& Common::ConfigManager::Domain::operator[] ( const String key) const
inline

Return the configuration value for the given key. If no entry exists for the given key in the configuration, it is created.Return the configuration value for the given key.

Note
This function does not create a configuration entry for the given key if it does not exist.

◆ setVal()

void Common::ConfigManager::Domain::setVal ( const String key,
const String value 
)
inline

Assign a value to a key.

◆ getVal() [1/2]

String& Common::ConfigManager::Domain::getVal ( const String key)
inline

Retrieve the value of a key.

◆ getVal() [2/2]

const String& Common::ConfigManager::Domain::getVal ( const String key) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ getValOrDefault()

const String& Common::ConfigManager::Domain::getValOrDefault ( const String key) const
inline

Retrieve the value of key if it exists and leave the referenced variable unchanged if the key does not exist.

Returns
True if the key exists, false otherwise. You can use this method if you frequently attempt to access keys that do not exist.

◆ clear()

void Common::ConfigManager::Domain::clear ( )
inline

Clear all configuration entries in the domain.

◆ erase()

void Common::ConfigManager::Domain::erase ( const String key)
inline

Remove a key from the domain.

◆ setDomainComment()

void Common::ConfigManager::Domain::setDomainComment ( const String comment)

Add a comment for this configuration domain.

◆ getDomainComment()

const String& Common::ConfigManager::Domain::getDomainComment ( ) const

Retrieve the comment of this configuration domain.

◆ setKVComment()

void Common::ConfigManager::Domain::setKVComment ( const String key,
const String comment 
)

Add a key-value comment to a key.

◆ getKVComment()

const String& Common::ConfigManager::Domain::getKVComment ( const String key) const

Retrieve the key-value comment of a key.

◆ hasKVComment()

bool Common::ConfigManager::Domain::hasKVComment ( const String key) const

Check whether a key has a key-value comment.


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