|
def | __init__ (self, cpp_type, default, doc="undocumented", semantics=None) |
|
def | cpp_type (self) |
|
def | name (self) |
|
def | __get__ (self, instance, owner) |
|
def | __set__ (self, instance, value) |
|
def | __delete__ (self, instance) |
|
def | __set_name__ (self, owner, name) |
|
def | __is_set__ (self, instance, owner) |
|
def | __opt_value__ (self, instance, owner) |
|
def | __merge__ (self, instance, owner, value) |
|
Descriptor class to implement validation of Configurable properties.
Definition at line 31 of file _configurables.py.
◆ __init__()
def GaudiConfig2._configurables.Property.__init__ |
( |
|
self, |
|
|
|
cpp_type, |
|
|
|
default, |
|
|
|
doc = "undocumented" , |
|
|
|
semantics = None |
|
) |
| |
Definition at line 36 of file _configurables.py.
36 def __init__(self, cpp_type, default, doc="undocumented", semantics=None):
37 from .semantics
import getSemanticsFor
40 self.default = default
◆ __delete__()
def GaudiConfig2._configurables.Property.__delete__ |
( |
|
self, |
|
|
|
instance |
|
) |
| |
Definition at line 59 of file _configurables.py.
59 def __delete__(self, instance):
60 del instance._properties[self.name]
◆ __get__()
def GaudiConfig2._configurables.Property.__get__ |
( |
|
self, |
|
|
|
instance, |
|
|
|
owner |
|
) |
| |
Definition at line 51 of file _configurables.py.
51 def __get__(self, instance, owner):
52 if self.name
not in instance._properties
and hasattr(self.semantics,
"default"):
53 instance._properties[self.name] = self.semantics.
default(self.default)
54 return self.semantics.load(instance._properties.get(self.name, self.default))
◆ __is_set__()
def GaudiConfig2._configurables.Property.__is_set__ |
( |
|
self, |
|
|
|
instance, |
|
|
|
owner |
|
) |
| |
Definition at line 65 of file _configurables.py.
65 def __is_set__(self, instance, owner):
67 value = instance._properties[self.name]
68 return self.semantics.is_set(value)
◆ __merge__()
def GaudiConfig2._configurables.Property.__merge__ |
( |
|
self, |
|
|
|
instance, |
|
|
|
owner, |
|
|
|
value |
|
) |
| |
Return "merge" (according to the semantic) of the value
in this property and the incoming value.
Definition at line 77 of file _configurables.py.
77 def __merge__(self, instance, owner, value):
79 Return "merge" (according to the semantic) of the value
80 in this property and the incoming value.
82 if not self.__is_set__(instance, owner):
84 return self.semantics.
merge(self.__get__(instance, owner), value)
◆ __opt_value__()
def GaudiConfig2._configurables.Property.__opt_value__ |
( |
|
self, |
|
|
|
instance, |
|
|
|
owner |
|
) |
| |
Definition at line 72 of file _configurables.py.
72 def __opt_value__(self, instance, owner):
73 return self.semantics.opt_value(
74 instance._properties.get(self.name, self.default)
◆ __set__()
def GaudiConfig2._configurables.Property.__set__ |
( |
|
self, |
|
|
|
instance, |
|
|
|
value |
|
) |
| |
Definition at line 56 of file _configurables.py.
56 def __set__(self, instance, value):
57 instance._properties[self.name] = self.semantics.store(value)
◆ __set_name__()
def GaudiConfig2._configurables.Property.__set_name__ |
( |
|
self, |
|
|
|
owner, |
|
|
|
name |
|
) |
| |
Definition at line 62 of file _configurables.py.
62 def __set_name__(self, owner, name):
63 self.semantics.name = name
◆ cpp_type()
def GaudiConfig2._configurables.Property.cpp_type |
( |
|
self | ) |
|
◆ name()
def GaudiConfig2._configurables.Property.name |
( |
|
self | ) |
|
◆ __doc__
GaudiConfig2._configurables.Property.__doc__ |
|
private |
◆ default
GaudiConfig2._configurables.Property.default |
◆ semantics
GaudiConfig2._configurables.Property.semantics |
The documentation for this class was generated from the following file: