ScummVM API documentation
Common::INIFile::Section Struct Reference

#include <ini-file.h>

Public Member Functions

bool hasKey (const String &key) const
 
const KeyValuegetKey (const String &key) const
 
void setKey (const String &key, const String &value)
 
void removeKey (const String &key)
 
const SectionKeyList getKeys () const
 

Public Attributes

String name
 
List< KeyValuekeys
 
String comment
 

Detailed Description

A section in an INI file.

Corresponds to the following:

[mySection]
key=value

Comments are also stored, for convenience of users who prefer to edit INI files manually.

Member Function Documentation

◆ hasKey()

bool Common::INIFile::Section::hasKey ( const String key) const

Check whether the section has a key.

◆ getKey()

const KeyValue* Common::INIFile::Section::getKey ( const String key) const

Get the value assigned to a key.

◆ setKey()

void Common::INIFile::Section::setKey ( const String key,
const String value 
)

Assign a value to a key.

◆ removeKey()

void Common::INIFile::Section::removeKey ( const String key)

Remove a key from this section.

◆ getKeys()

const SectionKeyList Common::INIFile::Section::getKeys ( ) const
inline

Get a list of all keys in the section.

Member Data Documentation

◆ name

String Common::INIFile::Section::name

Name of the section, whitespace trimmed.

◆ keys

List<KeyValue> Common::INIFile::Section::keys

List of all keys in this section.

◆ comment

String Common::INIFile::Section::comment

Comment within the section, including #s and newlines.


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