IniSection

Represents ini section

Constructors

this
this(string name)

Creates new IniSection instance

this
this(string name, IniSection* parent)

Creates new IniSection instance

Members

Aliases

opCall
alias opCall = getKey

Gets key value

opIndex
alias opIndex = getSection

Returns reference to section

Functions

addSection
void addSection(IniSection section)

Adds section

getKey
string getKey(string name)

Gets key value

getKey
string getKey(string name, string defaultValue)

Gets key value or defaultValue if key does not exist

getParent
IniSection* getParent()

Section parent

getSection
IniSection getSection(string name)

Returns reference to section

getSectionEx
IniSection getSectionEx(string name)

Returns section by name in inheriting(names connected by dot)

hasKey
bool hasKey(string name)

Checks if specified key exists

hasParent
bool hasParent()

Checks if current section has parent

hasSection
bool hasSection(string name)

Checks if specified section exists

inherit
void inherit(IniSection sect)

Inherits keys from section

keys
string[string] keys()

Array of keys

name
string name()

Section name

parse
void parse(string filename, bool doLookups)

Parses filename

parse
void parse(File* file, bool doLookups)
Undocumented in source. Be warned that the author may not have intended to support it.
parseLookups
void parseLookups()

Parses lookups

parseString
void parseString(string data, bool doLookups)
Undocumented in source. Be warned that the author may not have intended to support it.
parseStringWith
void parseStringWith(string data, bool doLookups)
Undocumented in source. Be warned that the author may not have intended to support it.
parseWith
void parseWith(string filename, bool doLookups)
Undocumented in source. Be warned that the author may not have intended to support it.
parseWith
void parseWith(File* file, bool doLookups)
Undocumented in source. Be warned that the author may not have intended to support it.
removeKey
void removeKey(string name)

Removes key

removeSection
void removeSection(string name)

Removes section

root
IniSection root()

Root section

save
void save(string filename)
Undocumented in source. Be warned that the author may not have intended to support it.
sections
IniSection[] sections()

Array of sections

setKey
void setKey(string name, string value)

Sets section key

setParent
void setParent(IniSection parent)

Moves current section to another one

Static functions

Parse
Ini Parse(string filename, bool parseLookups)

Parses Ini file

ParseString
Ini ParseString(string data, bool parseLookups)
Undocumented in source. Be warned that the author may not have intended to support it.
ParseStringWith
Ini ParseStringWith(string data, bool parseLookups)
Undocumented in source. Be warned that the author may not have intended to support it.
ParseWith
Ini ParseWith(string filename, bool parseLookups)

Parses Ini file with specified reader

Variables

_keys
string[string] _keys;

Keys

_name
string _name;

Section name

_parent
IniSection* _parent;

Parent Null if none

_sections
IniSection[] _sections;

Childs

Examples

Ini ini = Ini.Parse("path/to/your.conf");
string value = ini.getKey("a");

Meta