Definition at line 151 of file TransformConfig.py.
◆ __init__()
def python.TransformConfig.Float.__init__ |
( |
|
self, |
|
|
|
doc, |
|
|
|
default, |
|
|
|
allowedValues = None |
|
) |
| |
◆ __get__()
def python.TransformConfig.Descriptor.__get__ |
( |
|
self, |
|
|
|
instance, |
|
|
|
owner |
|
) |
| |
|
inherited |
Definition at line 35 of file TransformConfig.py.
35 def __get__(self,instance,owner):
38 return instance._attributeDictionary().
get(self._attributeName(instance),self.__default)
◆ __set__()
def python.TransformConfig.Descriptor.__set__ |
( |
|
self, |
|
|
|
instance, |
|
|
|
value |
|
) |
| |
|
inherited |
Definition at line 41 of file TransformConfig.py.
41 def __set__(self,instance,value):
42 varName =
"%s.%s" % (instance.name(), self.__name)
46 value = self._checkType(varName,value)
47 value = self._checkValue(varName,value)
49 self._setValue(varName,value)
50 instance._attributeDictionary()[self._attributeName(instance)] = value
◆ _attributeName()
def python.TransformConfig.Descriptor._attributeName |
( |
|
self, |
|
|
|
instance |
|
) |
| |
|
privateinherited |
Definition at line 53 of file TransformConfig.py.
53 def _attributeName(self,instance):
54 return '_%s__%s' % (instance.__class__.__name__,self.__name)
◆ _checkAllowedValues()
def python.TransformConfig.Descriptor._checkAllowedValues |
( |
|
self, |
|
|
|
variableName, |
|
|
|
allowedValues |
|
) |
| |
|
privateinherited |
◆ _checkType()
def python.TransformConfig.Descriptor._checkType |
( |
|
self, |
|
|
|
variableName, |
|
|
|
value |
|
) |
| |
|
privateinherited |
Private helper functin to check the type of <value>. May convert to another type.
This implementation does nothing, it just returns value.
This function can be overridden in derived class to do type checking.
It should return the value (possible with new type), or raise a TransformConfigError
exception in case of problems.
Reimplemented in python.TransformConfig.ListOfStrings, and python.TransformConfig.UniqueList.
Definition at line 83 of file TransformConfig.py.
83 def _checkType(self,variableName,value):
84 """Private helper functin to check the type of <value>. May convert to another type.
85 This implementation does nothing, it just returns value.
86 This function can be overridden in derived class to do type checking.
87 It should return the value (possible with new type), or raise a TransformConfigError
88 exception in case of problems. """
◆ _checkValue()
def python.TransformConfig.Float._checkValue |
( |
|
self, |
|
|
|
variableName, |
|
|
|
value |
|
) |
| |
|
private |
Private helper function to check the value of <value>. This function is
called after calling _checkType. <value> can therefore be considered to be
of the correct type.
This implementation checks that the value is one of the allowed values (if defined).
This function can be overridden in derived class to do type & additional value checking.
It has to return the value (adapted if needed) if all is OK. It has to raise
a TransformConfigError exception in case of problems.
<variableName> is the name of the variable that is being set and is typically
only used for error messages.
Reimplemented from python.TransformConfig.Descriptor.
Definition at line 156 of file TransformConfig.py.
156 def _checkValue(self,variableName,value):
160 raise TransformConfigError(
'%s value %s is not a float' % (variableName, value) )
163 return Descriptor._checkValue(self,variableName,value)
◆ _setValue()
def python.TransformConfig.Descriptor._setValue |
( |
|
self, |
|
|
|
variableName, |
|
|
|
value |
|
) |
| |
|
privateinherited |
Private helper function which is called when the value of the object is set.
It is called after _checkType() and _checkValue(), so the value can be
assumed to be correct.
This function can be overridden in a derived class, typically to trigger additional action
when the value is set.
In case of error, raise a TransformConfigError exception, otherwise just return.
This implementation does nothing.
<variableName> is the name of the variable that is being set and is typically
only used for error messages.
Definition at line 109 of file TransformConfig.py.
109 def _setValue(self,variableName,value):
110 """Private helper function which is called when the value of the object is set.
111 It is called after _checkType() and _checkValue(), so the value can be
112 assumed to be correct.
113 This function can be overridden in a derived class, typically to trigger additional action
114 when the value is set.
115 In case of error, raise a TransformConfigError exception, otherwise just return.
116 This implementation does nothing.
117 <variableName> is the name of the variable that is being set and is typically
118 only used for error messages."""
◆ allowedValues()
def python.TransformConfig.Descriptor.allowedValues |
( |
|
self | ) |
|
|
inherited |
◆ default()
def python.TransformConfig.Descriptor.default |
( |
|
self | ) |
|
|
inherited |
◆ doc()
def python.TransformConfig.Descriptor.doc |
( |
|
self | ) |
|
|
inherited |
The documentation string
Definition at line 65 of file TransformConfig.py.
66 """The documentation string"""
◆ help()
def python.TransformConfig.Descriptor.help |
( |
|
self | ) |
|
|
inherited |
The help string: type, documentation and possible values
Definition at line 70 of file TransformConfig.py.
71 """The help string: type, documentation and possible values"""
72 hlp =
'(%s) %s' % (self.__class__.__name__, self.__doc)
74 hlp +=
'. Possible values: %s' % self.__allowed
◆ name()
def python.TransformConfig.Descriptor.name |
( |
|
self | ) |
|
|
inherited |
◆ __allowed
python.TransformConfig.Descriptor.__allowed |
|
privateinherited |
◆ __default
python.TransformConfig.Descriptor.__default |
|
privateinherited |
◆ __doc
python.TransformConfig.Descriptor.__doc |
|
privateinherited |
◆ __name
python.TransformConfig.Descriptor.__name |
|
privateinherited |
The documentation for this class was generated from the following file: