Definition at line 503 of file semantics.py.
◆ __init__()
| GaudiConfig2.semantics._SetHelper.__init__ |
( |
| self, |
|
|
| semantics ) |
Definition at line 504 of file semantics.py.
504 def __init__(self, semantics):
505 self.value_semantics = semantics
506 self.default = set()
507 self._data = set()
508 self.is_dirty = False
509
◆ __contains__()
| GaudiConfig2.semantics._SetHelper.__contains__ |
( |
| self, |
|
|
| value ) |
Definition at line 524 of file semantics.py.
524 def __contains__(self, value):
525 return self.value_semantics.store(value) in self.data
526
◆ __eq__()
| GaudiConfig2.semantics._SetHelper.__eq__ |
( |
| self, |
|
|
| other ) |
Definition at line 527 of file semantics.py.
527 def __eq__(self, other):
528 return self.data == other
529
◆ __iter__()
| GaudiConfig2.semantics._SetHelper.__iter__ |
( |
| self | ) |
|
Definition at line 530 of file semantics.py.
530 def __iter__(self):
531 for value in self.data:
532 yield self.value_semantics.load(value)
533
◆ __len__()
| GaudiConfig2.semantics._SetHelper.__len__ |
( |
| self | ) |
|
Definition at line 521 of file semantics.py.
521 def __len__(self):
522 return len(self.data)
523
◆ __repr__()
| GaudiConfig2.semantics._SetHelper.__repr__ |
( |
| self | ) |
|
Definition at line 551 of file semantics.py.
551 def __repr__(self):
552 if self.data:
553
554 return "{" + repr(sorted(self.data))[1:-1] + "}"
555 else:
556 return "set()"
557
558
◆ add()
| GaudiConfig2.semantics._SetHelper.add |
( |
| self, |
|
|
| value ) |
Definition at line 534 of file semantics.py.
534 def add(self, value):
535 self.is_dirty = True
536 self.data.add(self.value_semantics.store(value))
537
◆ data()
| GaudiConfig2.semantics._SetHelper.data |
( |
| self | ) |
|
Definition at line 518 of file semantics.py.
518 def data(self):
519 return self._data if self.is_dirty else self.default
520
◆ discard()
| GaudiConfig2.semantics._SetHelper.discard |
( |
| self, |
|
|
| value ) |
Definition at line 538 of file semantics.py.
538 def discard(self, value):
539 if not self.is_dirty:
540 raise RuntimeError("cannot remove elements from the default value")
541 self.data.discard(value)
542
◆ opt_value()
| GaudiConfig2.semantics._SetHelper.opt_value |
( |
| self | ) |
|
Definition at line 548 of file semantics.py.
548 def opt_value(self):
549 return set(self.value_semantics.opt_value(item) for item in self.data)
550
◆ pop()
| GaudiConfig2.semantics._SetHelper.pop |
( |
| self | ) |
|
Definition at line 543 of file semantics.py.
543 def pop(self):
544 if not self.is_dirty:
545 raise RuntimeError("cannot remove elements from the default value")
546 return self.data.pop()
547
◆ _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: