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")
# outputGismo.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")
# outputGismo.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")
# outputGismo.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")
# outputGismo.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
1Gismo.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.0Gismo.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
trueGismo.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)
# outputGismo.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)
# outputGismo.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")
# outputGismo.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)
# outputGismo.OptionList — TypeA struct that represents a list of options