gsIO

The methods in gsIO contain G+Smo's methods for input and output.

Function Documentation

Gismo.addIntFunction

Add an integer to the option list

Arguments

  • opt::OptionList: the option list
  • key::String: the key
  • int::Int: the value
  • desc::String: the description

Examples

opt = OptionList()
addInt(opt,"key",1,"description")
# output
source
Gismo.addRealFunction

Add a real to the option list

Arguments

  • opt::OptionList: the option list
  • key::String: the key
  • real::Cdouble: the value
  • desc::String: the description

Examples

opt = OptionList()
addReal(opt,"key",1.0,"description")
# output
source
Gismo.addStringFunction

Add a string to the option list

Arguments

  • opt::OptionList: the option list
  • key::String: the key
  • string::String: the value
  • desc::String: the description

Examples

opt = OptionList()
addString(opt,"key","value","description")
# output
source
Gismo.addSwitchFunction

Add a switch to the option list

Arguments

  • opt::OptionList: the option list
  • key::String: the key
  • switch::Bool: the value
  • desc::String: the description

Examples

opt = OptionList()
addSwitch(opt,"key",true,"description")
# output
source
Gismo.getIntMethod

Get an integer from the option list

Arguments

  • opt::OptionList: the option list
  • key::String: the key

Return

  • int::Int: the value

Examples

opt = OptionList(Dict("key1"=>1))
println(getInt(opt,"key1"))
# output
1
source
Gismo.getRealMethod

Get a real from the option list

Arguments

  • opt::OptionList: the option list
  • key::String: the key

Return

  • real::Cdouble: the value

Examples

opt = OptionList(Dict("key1"=>1.0))
println(getReal(opt,"key1"))
# output
1.0
source
Gismo.getStringMethod

Get a string from the option list

Arguments

  • opt::OptionList: the option list
  • key::String: the key

Return

  • string::Cstring: the value
Warning

The returned value is a Cstring, and its conversion to a Julia string is not trivial.

source
Gismo.getSwitchMethod

Get a switch from the option list

Arguments

  • opt::OptionList: the option list
  • key::String: the key

Return

  • switch::Bool: the value

Examples

opt = OptionList(Dict("key1"=>true))
println(getSwitch(opt,"key1"))
# output
true
source
Gismo.setIntMethod

Set an integer to the option list

Arguments

  • opt::OptionList: the option list
  • key::String: the key
  • int::Int: the value

Εxamples

opt = OptionList(Dict("key"=>1))
setInt(opt,"key",2)
# output
source
Gismo.setRealMethod

Set a real to the option list

Arguments

  • opt::OptionList: the option list
  • key::String: the key
  • real::Cdouble: the value

Examples

opt = OptionList(Dict("key"=>1.0))
setReal(opt,"key",2.0)
# output
source
Gismo.setStringMethod

Set a string to the option list

Arguments

  • opt::OptionList: the option list
  • key::String: the key
  • string::String: the value

Examples

opt = OptionList(Dict("key"=>"value"))
setString(opt,"key","value")
# output
source
Gismo.setSwitchMethod

Set a switch to the option list

Arguments

  • opt::OptionList: the option list
  • key::String: the key
  • switch::Bool: the value

Examples

opt = OptionList(Dict("key"=>true))
setSwitch(opt,"key",false)
# output
source