Trees | Indices | Help |
|
---|
|
object --+ | CfgAtom
This class represents the "atomic" parameters in a config file. Atomic parameters do not contain further sub-elements. For example, 'force.type' is an atomic parameter, whereas 'force' is not because it has sub-elements like 'type', 'gibbs', etc. Public attributes: - validate - None by default. This attribute can be set to be a callable object that assesses whether a given value is legal or not for this 'CfgAtom' object. The callable object should be able to take one argument -- the value subject to its assessment and returns either True (if the value is OK) or False (if the value is illegal). Properties: - val - This is a read-write property for accessing the value of this 'CfgAtom' object.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
val Readwrite. |
|||
|
Constructs a 'CfgAtom' object based on the value 's'.
|
Converts the value to a string. If the value itself is a string, then returns the value flanked with double-quotes (i.e., "<value>").
|
Sets the value. If the public attribute 'validate' is not None, then after the conversion the value will be sent to the callable object as pointed by the 'validate' attribute for assessment. If the assessment returns True, the value will be set; otherwise it is discarded.
|
This method will replace all occurences (in the value) of each key (in 'macro_dict') to the corresponding value. It has effect only for string type of values. For example, if the value is
|
This is usually called after an expand_macro call and recovers the value to the original macro-containing form. For example, if the value is changed (by expand_macro) from |
Internally makes a copy of the current value. This internal copy can be used later on to recover the value if the value was changed unwantedly. |
Recovers the value to the internal copy of the value. The internal copy of the value was made by the last call to the 'backup' function. |
Updates the value with 'val', which is exactly the same as setting the value via the 'val' property. If the public attribute 'validate' is not None, then after the conversion the value will be sent to the callable object as pointed by the 'validate' attribute for assessment. If the assessment returns True, the value will be set; otherwise it is discarded.
|
|
valReadwrite. When read, this returns the current value. |
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Oct 26 00:59:42 2016 | http://epydoc.sourceforge.net |