|
| def | __init__ (self, cpp_type) |
| |
| def | store (self, value) |
| |
| def | default (self, value) |
| |
| def | name (self) |
| |
| def | name (self, value) |
| |
| def | cpp_type (self) |
| |
| def | cpp_type (self, value) |
| |
| def | load (self, value) |
| |
| def | is_set (self, value) |
| |
| def | opt_value (self, value) |
| |
| def | merge (self, a, b) |
| |
Definition at line 207 of file semantics.py.
◆ __init__()
| def GaudiConfig2.semantics.ComponentSemantics.__init__ |
( |
|
self, |
|
|
|
cpp_type |
|
) |
| |
Reimplemented from GaudiConfig2.semantics.PropertySemantics.
Definition at line 219 of file semantics.py.
219 def __init__(self, cpp_type):
220 super(ComponentSemantics, self).__init__(cpp_type)
222 self.cpp_type, self.interfaces = cpp_type.split(
":", 1)
223 self.interfaces = set(self.interfaces.split(
","))
225 self.cpp_type = cpp_type
226 self.interfaces = set()
◆ default()
| def GaudiConfig2.semantics.ComponentSemantics.default |
( |
|
self, |
|
|
|
value |
|
) |
| |
◆ store()
| def GaudiConfig2.semantics.ComponentSemantics.store |
( |
|
self, |
|
|
|
value |
|
) |
| |
Validation/transformation of the data to be stored.
Reimplemented from GaudiConfig2.semantics.PropertySemantics.
Definition at line 228 of file semantics.py.
228 def store(self, value):
229 if isinstance(value, Configurable):
231 elif isinstance(value, str):
233 if value
in Configurable.instances:
234 value = Configurable.instances[value]
238 t, n = value.split(
"/")
241 value = Configurables.getByType(t).getInstance(n)
244 "cannot assign {!r} to {!r}, requested string or {!r}".
format(
245 value, self.name, self.cpp_type
248 if value.__component_type__ != self.cpp_type:
250 "wrong type for {!r}: expected {!r}, got {!r}".
format(
251 self.name, self.cpp_type, value.__component_type__
256 if value.__interfaces__:
257 if not self.interfaces.issubset(value.__interfaces__):
259 "wrong interfaces for {!r}: required {}".
format(
260 self.name, list(self.interfaces)
263 except AttributeError:
◆ __handled_types__
| GaudiConfig2.semantics.ComponentSemantics.__handled_types__ |
|
staticprivate |
◆ cpp_type
| GaudiConfig2.semantics.ComponentSemantics.cpp_type |
◆ interfaces
| GaudiConfig2.semantics.ComponentSemantics.interfaces |
The documentation for this class was generated from the following file: