PSCF v1.1
|
A Parameter represents a single parameter in a parameter file. More...
Public Member Functions | |
def | __init__ (self, label, val) |
Constructor. More... | |
def | setValue (self, val) |
Set the new value to the Parameter object. More... | |
def | __str__ (self) |
Unindented string representation of this Parameter object. More... | |
def | getString (self, depth='') |
Indented string for the Parameter object. More... | |
def | returnData (self) |
Return the stored value. More... | |
A Parameter represents a single parameter in a parameter file.
A Parameter object contains the label and value of a single parameter. A single parameter is represented in a parameter file by a single line containing a label followed by one or more values separated by spaces.
def pscfpp.param.Parameter.__init__ | ( | self, | |
label, | |||
val | |||
) |
Constructor.
label | label string for the individual parameter |
val | parameter value |
Definition at line 460 of file param.py.
References pscfpp.param.getValue(), pscfpp.command.Command.label, pscfpp.param.Composite.label, pscfpp.param.Parameter.label, pscfpp.param.Array.label, pscfpp.param.Matrix.label, Util::XmlAttribute.label(), Util::XmlEndTag.label(), Util::XmlStartTag.label(), Util::ArrayParam< Type >.label(), Util::MatrixParam< Type >.label(), Util::Parameter.label(), pscfpp.param.Parameter.val, pscfpp.param.Array.val, and pscfpp.param.Matrix.val.
def pscfpp.param.Parameter.setValue | ( | self, | |
val | |||
) |
Set the new value to the Parameter object.
This function sets the new value, parameter val, for this Parameter object.
val | the expected new value. |
Definition at line 475 of file param.py.
References pscfpp.param.getValue(), pscfpp.param.Parameter.val, pscfpp.param.Array.val, and pscfpp.param.Matrix.val.
def pscfpp.param.Parameter.__str__ | ( | self | ) |
Unindented string representation of this Parameter object.
This function returns the unindented string representation for this Parameter object, containing a label followed by the value.
Definition at line 491 of file param.py.
References pscfpp.param.Composite.getString(), pscfpp.param.Parameter.getString(), pscfpp.param.Array.getString(), and pscfpp.param.Matrix.getString().
Referenced by pscfpp.field.Field.write(), pscfpp.output.Thermo.write(), and pscfpp.output.State.write().
def pscfpp.param.Parameter.getString | ( | self, | |
depth = '' |
|||
) |
Indented string for the Parameter object.
This function returns the indented string representation for the Parameter object in the param file format, with prefix depth as the passed-in parameter.
depth | the spaces string as the prefix depth. |
Definition at line 504 of file param.py.
References pscfpp.param.Parameter.val, pscfpp.param.Array.val, and pscfpp.param.Matrix.val.
Referenced by pscfpp.param.Composite.__str__(), pscfpp.param.Parameter.__str__(), pscfpp.param.Array.__str__(), pscfpp.param.Matrix.__str__(), and pscfpp.param.Composite.write().
def pscfpp.param.Parameter.returnData | ( | self | ) |
Return the stored value.
This function returns the value stored in the Parameter object.
Return value:
The value stored in the Parameter object.
Definition at line 531 of file param.py.
References pscfpp.param.Parameter.val, pscfpp.param.Array.val, and pscfpp.param.Matrix.val.