Setting

setting object

final
class Setting {}

Constructors

this
this()
Undocumented in source.
this
this(long v)
Undocumented in source.
this
this(ulong v)
Undocumented in source.
this
this(string v)
Undocumented in source.
this
this(double v)
Undocumented in source.
this
this(bool v)
Undocumented in source.
this
this(Setting[] v)
Undocumented in source.
this
this(string[] v)
Undocumented in source.
this
this(string[string] v)
Undocumented in source.

Members

Functions

apply
void apply(Setting settings)
Undocumented in source. Be warned that the author may not have intended to support it.
booleanDef
inout(bool) booleanDef(bool defValue)

read as boolean value

clear
void clear(SettingType newType)

clear value and set new type

clear
void clear()

clear value

clone
Setting clone()

deep copy of settings

floatingDef
inout(double) floatingDef(double defValue)

read as double value with default

getBoolean
bool getBoolean(int index, bool defValue)

returns bool item by index of array or map

getBoolean
bool getBoolean(string key, bool defValue)

returns bool item by key from map

getFloating
double getFloating(int index, double defValue)

returns double item by index of array or map

getFloating
double getFloating(string key, double defValue)

returns double item by key from map

getInteger
long getInteger(int index, long defValue)

returns long item by index of array or map

getInteger
long getInteger(string key, long defValue)

returns long item by key from map

getString
string getString(int index, string defValue)

returns str item by index of array or map

getString
string getString(string key, string defValue)

returns str item by key from map

getStringArray
string[] getStringArray(string key)

returns string array item by key from map, returns null if not found

getUinteger
ulong getUinteger(int index, ulong defValue)

returns ulong item by index of array or map

getUinteger
ulong getUinteger(string key, ulong defValue)

returns ulong item by key from map

integerDef
inout(long) integerDef(long defValue)

read as long value

isArrayIdent
bool isArrayIdent(string ident)
Undocumented in source. Be warned that the author may not have intended to support it.
isArrayItemNameIdent
bool isArrayItemNameIdent(string ident)
Undocumented in source. Be warned that the author may not have intended to support it.
isObjectItemNameIdent
bool isObjectItemNameIdent(string ident)
Undocumented in source. Be warned that the author may not have intended to support it.
length
int length()

get number of elements for array or map, returns 0 for other types

load
bool load(string filename)

load from file; autodetect SDL format using ".sdl" and ".SDL" extension mask; returns true if loaded successfully

objectByPath
Setting objectByPath(string path, bool createIfNotExist)

get (or optionally create) object (map) by slash delimited path (e.g. key1/subkey2/subkey3)

opApply
int opApply(int delegate(ref Setting) dg)

to iterate using foreach

opApply
int opApply(int delegate(ref string, ref Setting) dg)

to iterate over OBJECT using foreach(key, value; map)

opApplyReverse
int opApplyReverse(int delegate(ref Setting) dg)

to iterate using foreach_reverse

opAssign
long opAssign(long value)
Undocumented in source. Be warned that the author may not have intended to support it.
opAssign
ulong opAssign(ulong value)
Undocumented in source. Be warned that the author may not have intended to support it.
opAssign
string opAssign(string value)
Undocumented in source. Be warned that the author may not have intended to support it.
opAssign
bool opAssign(bool value)
Undocumented in source. Be warned that the author may not have intended to support it.
opAssign
double opAssign(double value)
Undocumented in source. Be warned that the author may not have intended to support it.
opAssign
int[] opAssign(int[] value)
Undocumented in source. Be warned that the author may not have intended to support it.
opAssign
string[string] opAssign(string[string] value)
Undocumented in source. Be warned that the author may not have intended to support it.
opAssign
string[] opAssign(string[] value)
Undocumented in source. Be warned that the author may not have intended to support it.
opAssign
int[string] opAssign(int[string] value)
Undocumented in source. Be warned that the author may not have intended to support it.
opAssign
Setting[] opAssign(Setting[] value)
Undocumented in source. Be warned that the author may not have intended to support it.
opAssign
Setting[string] opAssign(Setting[string] value)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndex
Setting opIndex(int index)

for array or object returns item by index, null if index is out of bounds or setting is neither array nor object

opIndex
Setting opIndex(string key)

for object returns item by key, null if not found or this setting is not an object

opIndexAssign
T opIndexAssign(T value, int index)

sets value for array item by integer index

opIndexAssign
T opIndexAssign(T value, string key)

sets value for object item by string key

parseJSON
void parseJSON(string s)
Undocumented in source. Be warned that the author may not have intended to support it.
parseSDL
void parseSDL(string s)
Undocumented in source. Be warned that the author may not have intended to support it.
remove
Setting remove(int index)

for array or object remove item by index, returns removed item or null if index is out of bounds or setting is neither array nor object

remove
Setting remove(string key)

for object remove item by key, returns removed item or null if is not found or setting is not an object

save
bool save(string filename, bool pretty)

save to file

setBoolean
bool setBoolean(int index, bool value)

sets bool item by index of array or map

setBoolean
bool setBoolean(string key, bool value)

sets bool item of map

setBooleanDef
bool setBooleanDef(int index, bool value)

sets bool item by index of array or map only if it's фдкуфвн present

setBooleanDef
bool setBooleanDef(string key, bool value)

sets bool item of map if key is not yet present in map

setDef
T setDef(T value, int index)

sets value for array item by integer index if not already present

setDef
T setDef(T value, string key)

sets value for object item by string key

setFloating
double setFloating(int index, double value)

sets double item by index of array or map

setFloating
double setFloating(string key, double value)

sets double item of map

setFloatingDef
double setFloatingDef(int index, double value)

sets double item by index of array or map only if it's фдкуфвн present

setFloatingDef
double setFloatingDef(string key, double value)

sets double item of map if key is not yet present in map

setInteger
long setInteger(int index, long value)

sets long item by index of array or map

setInteger
long setInteger(string key, long value)

sets long item of map

setIntegerDef
long setIntegerDef(int index, long value)

sets long item by index of array or map only if it's фдкуфвн present

setIntegerDef
long setIntegerDef(string key, long value)

sets long item of map if key is not yet present in map

setString
string setString(int index, string value)

sets str item by index of array or map

setString
string setString(string key, string value)

sets str item of map

setStringDef
string setStringDef(int index, string value)

sets str item by index of array or map only if it's фдкуфвн present

setStringDef
string setStringDef(string key, string value)

sets str item of map if key is not yet present in map

setUinteger
ulong setUinteger(int index, ulong value)

sets ulong item by index of array or map

setUinteger
ulong setUinteger(string key, ulong value)

sets ulong item of map

setUintegerDef
ulong setUintegerDef(int index, ulong value)

sets ulong item by index of array or map only if it's фдкуфвн present

setUintegerDef
ulong setUintegerDef(string key, ulong value)

sets ulong item of map if key is not yet present in map

settingByPath
Setting settingByPath(string path, SettingType type, bool createIfNotExist)

returns setting by path like "editors/sourceEditor/tabSize", creates object tree "editors/sourceEditor" and object of specified type if part of path does not exist.

strDef
inout(string) strDef(inout(string) defValue)

read as string value

toJSON
string toJSON(bool pretty)

serialize to json

toJSON
void toJSON(Buf buf, int level, bool pretty)
Undocumented in source. Be warned that the author may not have intended to support it.
uintegerDef
inout(long) uintegerDef(ulong defValue)

read as ulong value

Properties

array
Setting[] array [@property getter]

returns items as Setting array

array
Setting[] array [@property setter]

sets Setting array

boolean
inout(bool) boolean [@property getter]

read as boolean value

boolean
bool boolean [@property setter]

set bool value for object

changed
bool changed [@property getter]

returns true if setting has been changed

changed
bool changed [@property setter]

sets change flag

floating
inout(double) floating [@property getter]

read as double value

floating
double floating [@property setter]

set ulong value for object

intArray
int[] intArray [@property getter]

returns items as int array

intArray
int[] intArray [@property setter]

sets int array

intMap
int[string] intMap [@property getter]

returns items as intstring map

intMap
int[string] intMap [@property setter]

sets intstring map

integer
inout(long) integer [@property getter]

read as long value

integer
long integer [@property setter]

set long value for object

isArray
bool isArray [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isBoolean
bool isBoolean [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isFloating
bool isFloating [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isInteger
bool isInteger [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isNull
bool isNull [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isObject
bool isObject [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isString
bool isString [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isUinteger
bool isUinteger [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
map
Setting[string] map [@property getter]

returns items as Settingstring map

map
Setting[string] map [@property setter]

sets Settingstring map

parent
inout(Setting) parent [@property getter]

get parent

parent
Setting parent [@property setter]

set parent

str
string str [@property getter]

read as string value

str
string str [@property setter]

set string value for object

strArray
string[] strArray [@property getter]

returns items as string array

strArray
string[] strArray [@property setter]

sets string array

strMap
string[string] strMap [@property getter]

returns items as stringstring map

strMap
string[string] strMap [@property setter]

sets stringstring map

type
SettingType type [@property getter]

returns SettingType of setting

uinteger
inout(long) uinteger [@property getter]

read as ulong value

uinteger
ulong uinteger [@property setter]

set ulong value for object

Static functions

convertEols
string convertEols(string src)

convert CR LF, LF CR, LF, CR to '\n' eol format

parseBool
bool parseBool(string v, bool defValue)

parse string as boolean; supports 1, 0, y, n, yes, no, t, f, true, false; returns defValue if cannot be parsed

Unions

Store
union Store
Undocumented in source.

Meta