The Gaudi Framework  v41r0 (bdbe7744)
Loading...
Searching...
No Matches
GaudiConfig2.semantics.OrderedSetSemantics Class Reference
Inheritance diagram for GaudiConfig2.semantics.OrderedSetSemantics:
Collaboration diagram for GaudiConfig2.semantics.OrderedSetSemantics:

Public Member Functions

 __init__ (self, cpp_type)
 merge (self, bb, aa)
Public Member Functions inherited from GaudiConfig2.semantics.SequenceSemantics
 __init__ (self, cpp_type, valueSem=None)
 name (self)
 name (self, value)
 store (self, value)
 default (self, value)
 opt_value (self, value)
Public Member Functions inherited from GaudiConfig2.semantics.PropertySemantics
 __init__ (self, cpp_type)
 cpp_type (self)
 cpp_type (self, value)
 load (self, value)
 is_set (self, value)

Static Private Attributes

tuple __handled_types__

Additional Inherited Members

Public Attributes inherited from GaudiConfig2.semantics.SequenceSemantics
 value_semantics
Public Attributes inherited from GaudiConfig2.semantics.PropertySemantics
 cpp_type = cpp_type
Protected Attributes inherited from GaudiConfig2.semantics.PropertySemantics
 _name = None
 _cpp_type = value

Detailed Description

Extend the sequence-semantics with a merge-method to behave like a
OrderedSet: Values are unique but the order is maintained.
Use 'OrderedSet<T>' as fifth parameter of the Gaudi::Property<T> constructor
to invoke this merging method. Also applies to std::set.

Definition at line 695 of file semantics.py.

Constructor & Destructor Documentation

◆ __init__()

GaudiConfig2.semantics.OrderedSetSemantics.__init__ ( self,
cpp_type )

Definition at line 708 of file semantics.py.

708 def __init__(self, cpp_type):
709 super().__init__(cpp_type)
710

Member Function Documentation

◆ merge()

GaudiConfig2.semantics.OrderedSetSemantics.merge ( self,
a,
b )
"Merge" two values.

Used when merging two Configurable instances, by default just ensure
the two values do not conflict, but it can be overridden in
derived semantics to, for example, append to the two lists.

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 711 of file semantics.py.

711 def merge(self, bb, aa):
712 for b in bb:
713 if b not in aa:
714 aa.append(b)
715 return aa
716
717
int merge(const char *target, const char *source, bool fixup=false, bool dbg=true)
Definition merge.C:417

Member Data Documentation

◆ __handled_types__

tuple GaudiConfig2.semantics.OrderedSetSemantics.__handled_types__
staticprivate
Initial value:
= (
re.compile(r"(std::)?set<.*>$"),
re.compile(r"^OrderedSet<.*>$"),
)

Definition at line 703 of file semantics.py.


The documentation for this class was generated from the following file: