Definition at line 470 of file semantics.py.
◆ __init__()
GaudiConfig2.semantics._SetHelper.__init__ |
( |
| self, |
|
|
| semantics ) |
Definition at line 471 of file semantics.py.
471 def __init__(self, semantics):
472 self.value_semantics = semantics
473 self.default = set()
474 self._data = set()
475 self.is_dirty = False
476
◆ __contains__()
GaudiConfig2.semantics._SetHelper.__contains__ |
( |
| self, |
|
|
| value ) |
Definition at line 491 of file semantics.py.
491 def __contains__(self, value):
492 return self.value_semantics.store(value) in self.data
493
◆ __eq__()
GaudiConfig2.semantics._SetHelper.__eq__ |
( |
| self, |
|
|
| other ) |
Definition at line 494 of file semantics.py.
494 def __eq__(self, other):
495 return self.data == other
496
◆ __iter__()
GaudiConfig2.semantics._SetHelper.__iter__ |
( |
| self | ) |
|
Definition at line 497 of file semantics.py.
497 def __iter__(self):
498 for value in self.data:
499 yield self.value_semantics.load(value)
500
◆ __len__()
GaudiConfig2.semantics._SetHelper.__len__ |
( |
| self | ) |
|
Definition at line 488 of file semantics.py.
488 def __len__(self):
489 return len(self.data)
490
◆ __repr__()
GaudiConfig2.semantics._SetHelper.__repr__ |
( |
| self | ) |
|
Definition at line 518 of file semantics.py.
518 def __repr__(self):
519 if self.data:
520
521 return "{" + repr(sorted(self.data))[1:-1] + "}"
522 else:
523 return "set()"
524
525
◆ add()
GaudiConfig2.semantics._SetHelper.add |
( |
| self, |
|
|
| value ) |
Definition at line 501 of file semantics.py.
501 def add(self, value):
502 self.is_dirty = True
503 self.data.add(self.value_semantics.store(value))
504
◆ data()
GaudiConfig2.semantics._SetHelper.data |
( |
| self | ) |
|
Definition at line 485 of file semantics.py.
485 def data(self):
486 return self._data if self.is_dirty else self.default
487
◆ discard()
GaudiConfig2.semantics._SetHelper.discard |
( |
| self, |
|
|
| value ) |
Definition at line 505 of file semantics.py.
505 def discard(self, value):
506 if not self.is_dirty:
507 raise RuntimeError("cannot remove elements from the default value")
508 self.data.discard(value)
509
◆ opt_value()
GaudiConfig2.semantics._SetHelper.opt_value |
( |
| self | ) |
|
Definition at line 515 of file semantics.py.
515 def opt_value(self):
516 return set(self.value_semantics.opt_value(item) for item in self.data)
517
◆ pop()
GaudiConfig2.semantics._SetHelper.pop |
( |
| self | ) |
|
Definition at line 510 of file semantics.py.
510 def pop(self):
511 if not self.is_dirty:
512 raise RuntimeError("cannot remove elements from the default value")
513 return self.data.pop()
514
◆ _data
GaudiConfig2.semantics._SetHelper._data = set() |
|
protected |
◆ data
GaudiConfig2.semantics._SetHelper.data |
◆ default
GaudiConfig2.semantics._SetHelper.default = set() |
◆ difference
GaudiConfig2.semantics._SetHelper.difference = MutableSet.__isub__ |
|
static |
◆ intersection
GaudiConfig2.semantics._SetHelper.intersection = MutableSet.__iand__ |
|
static |
◆ is_dirty
bool GaudiConfig2.semantics._SetHelper.is_dirty = False |
◆ symmetric_difference
GaudiConfig2.semantics._SetHelper.symmetric_difference = MutableSet.__ixor__ |
|
static |
◆ union
GaudiConfig2.semantics._SetHelper.union = MutableSet.__ior__ |
|
static |
◆ update
GaudiConfig2.semantics._SetHelper.update = MutableSet.__ior__ |
|
static |
◆ value_semantics
GaudiConfig2.semantics._SetHelper.value_semantics = semantics |
The documentation for this class was generated from the following file: