|
def | __init__ (self, descr, docString, default) |
|
def | __get__ (self, obj, type=None) |
|
def | __set__ (self, obj, value) |
|
def | convertValueToBeSet (self, obj, value) |
|
def | setDefault (self, value) |
|
def | getDefault (self) |
|
def | fullPropertyName (self, obj) |
|
def | __delete__ (self, obj) |
|
Definition at line 402 of file PropertyProxy.py.
◆ __init__()
def python.PropertyProxy.DataHandlePropertyProxy.__init__ |
( |
|
self, |
|
|
|
descr, |
|
|
|
docString, |
|
|
|
default |
|
) |
| |
◆ __delete__()
def python.PropertyProxy.PropertyProxy.__delete__ |
( |
|
self, |
|
|
|
obj |
|
) |
| |
|
inherited |
Definition at line 172 of file PropertyProxy.py.
172 def __delete__( self, obj ):
173 if obj
in self.history:
174 del self.history[ obj ]
175 self.descr.__delete__( obj )
◆ __get__()
def python.PropertyProxy.DataHandlePropertyProxy.__get__ |
( |
|
self, |
|
|
|
obj, |
|
|
|
type = None |
|
) |
| |
Reimplemented from python.PropertyProxy.PropertyProxy.
Definition at line 406 of file PropertyProxy.py.
406 def __get__(self, obj, type=None):
408 return self.descr.__get__(obj, type)
409 except AttributeError:
412 default = obj.__class__.getDefaultProperty(self.descr.__name__)
413 default = self.convertValueToBeSet(obj, default)
415 self.__set__(obj, default)
416 except AttributeError
as e:
418 raise RuntimeError(*e.args)
420 return self.descr.__get__(obj, type)
◆ __set__()
def python.PropertyProxy.DataHandlePropertyProxy.__set__ |
( |
|
self, |
|
|
|
obj, |
|
|
|
value |
|
) |
| |
Reimplemented from python.PropertyProxy.PropertyProxy.
Definition at line 422 of file PropertyProxy.py.
422 def __set__(self, obj, value):
423 if not obj._isInSetDefaults()
or obj
not in self.history:
424 value = self.convertValueToBeSet(obj, value)
426 self.descr.__set__(obj, value)
427 log.debug(
"Setting %s = %r", self.fullPropertyName(obj), value)
428 self.history.setdefault(obj, []).
append(value)
◆ convertValueToBeSet()
def python.PropertyProxy.DataHandlePropertyProxy.convertValueToBeSet |
( |
|
self, |
|
|
|
obj, |
|
|
|
value |
|
) |
| |
Definition at line 430 of file PropertyProxy.py.
430 def convertValueToBeSet(self, obj, value):
434 mode = obj.__class__.getDefaultProperty(self.descr.__name__).
mode()
435 _type = obj.__class__.getDefaultProperty(self.descr.__name__).
type()
436 if type(value)
is str:
438 elif isinstance(value, DataHandle):
439 return DataHandle(value.__str__(), mode, _type)
441 raise ValueError(
"received an instance of %s, but %s expected" %
442 (
type(value),
'str or DataHandle'))
◆ fullPropertyName()
def python.PropertyProxy.PropertyProxy.fullPropertyName |
( |
|
self, |
|
|
|
obj |
|
) |
| |
|
inherited |
Definition at line 93 of file PropertyProxy.py.
93 def fullPropertyName( self, obj ):
94 return (obj.getJobOptName()
or obj.getName()) +
'.' + self.descr.__name__
◆ getDefault()
def python.PropertyProxy.PropertyProxy.getDefault |
( |
|
self | ) |
|
|
inherited |
◆ setDefault()
def python.PropertyProxy.PropertyProxy.setDefault |
( |
|
self, |
|
|
|
value |
|
) |
| |
|
inherited |
Definition at line 85 of file PropertyProxy.py.
85 def setDefault( self, value ):
86 self.__default = value
◆ __default
python.PropertyProxy.PropertyProxy.__default |
|
privateinherited |
◆ __doc__
python.PropertyProxy.PropertyProxy.__doc__ |
|
privateinherited |
◆ descr
python.PropertyProxy.PropertyProxy.descr |
|
inherited |
◆ history
python.PropertyProxy.PropertyProxy.history |
|
inherited |
◆ default
The documentation for this class was generated from the following file: