gsIO
The methods in gsIO
contain G+Smo's methods for input and output.
Function Documentation
Gismo.addInt
— FunctionAdd an integer to the option list
Arguments
opt::OptionList
: the option listkey::String
: the keyint::Int
: the valuedesc::String
: the description
Examples
opt = OptionList()
addInt(opt,"key",1,"description")
# output
Gismo.addReal
— FunctionAdd a real to the option list
Arguments
opt::OptionList
: the option listkey::String
: the keyreal::Cdouble
: the valuedesc::String
: the description
Examples
opt = OptionList()
addReal(opt,"key",1.0,"description")
# output
Gismo.addString
— FunctionAdd a string to the option list
Arguments
opt::OptionList
: the option listkey::String
: the keystring::String
: the valuedesc::String
: the description
Examples
opt = OptionList()
addString(opt,"key","value","description")
# output
Gismo.addSwitch
— FunctionAdd a switch to the option list
Arguments
opt::OptionList
: the option listkey::String
: the keyswitch::Bool
: the valuedesc::String
: the description
Examples
opt = OptionList()
addSwitch(opt,"key",true,"description")
# output
Gismo.getInt
— MethodGet an integer from the option list
Arguments
opt::OptionList
: the option listkey::String
: the key
Return
int::Int
: the value
Examples
opt = OptionList(Dict("key1"=>1))
println(getInt(opt,"key1"))
# output
1
Gismo.getReal
— MethodGet a real from the option list
Arguments
opt::OptionList
: the option listkey::String
: the key
Return
real::Cdouble
: the value
Examples
opt = OptionList(Dict("key1"=>1.0))
println(getReal(opt,"key1"))
# output
1.0
Gismo.getString
— MethodGet a string from the option list
Arguments
opt::OptionList
: the option listkey::String
: the key
Return
string::Cstring
: the value
The returned value is a Cstring, and its conversion to a Julia string is not trivial.
Gismo.getSwitch
— MethodGet a switch from the option list
Arguments
opt::OptionList
: the option listkey::String
: the key
Return
switch::Bool
: the value
Examples
opt = OptionList(Dict("key1"=>true))
println(getSwitch(opt,"key1"))
# output
true
Gismo.setInt
— MethodSet an integer to the option list
Arguments
opt::OptionList
: the option listkey::String
: the keyint::Int
: the value
Εxamples
opt = OptionList(Dict("key"=>1))
setInt(opt,"key",2)
# output
Gismo.setReal
— MethodSet a real to the option list
Arguments
opt::OptionList
: the option listkey::String
: the keyreal::Cdouble
: the value
Examples
opt = OptionList(Dict("key"=>1.0))
setReal(opt,"key",2.0)
# output
Gismo.setString
— MethodSet a string to the option list
Arguments
opt::OptionList
: the option listkey::String
: the keystring::String
: the value
Examples
opt = OptionList(Dict("key"=>"value"))
setString(opt,"key","value")
# output
Gismo.setSwitch
— MethodSet a switch to the option list
Arguments
opt::OptionList
: the option listkey::String
: the keyswitch::Bool
: the value
Examples
opt = OptionList(Dict("key"=>true))
setSwitch(opt,"key",false)
# output
Gismo.OptionList
— TypeA struct that represents a list of options