The Gaudi Framework  v36r6 (b1ee9983)
GaudiConfig2.semantics.OrderedSetSemantics Class Reference
Inheritance diagram for GaudiConfig2.semantics.OrderedSetSemantics:
Collaboration diagram for GaudiConfig2.semantics.OrderedSetSemantics:

Public Member Functions

def __init__ (self, cpp_type, name=None)
 
def merge (self, bb, aa)
 
- Public Member Functions inherited from GaudiConfig2.semantics.SequenceSemantics
def __init__ (self, cpp_type, name=None, valueSem=None)
 
def store (self, value)
 
def default (self, value)
 
def opt_value (self, value)
 
- Public Member Functions inherited from GaudiConfig2.semantics.PropertySemantics
def cpp_type (self)
 
def cpp_type (self, value)
 
def load (self, value)
 
def 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
 name
 
 cpp_type
 

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::[unordered_]set.

Definition at line 377 of file semantics.py.

Constructor & Destructor Documentation

◆ __init__()

def GaudiConfig2.semantics.OrderedSetSemantics.__init__ (   self,
  cpp_type,
  name = None 
)

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 390 of file semantics.py.

390  def __init__(self, cpp_type, name=None):
391  super(OrderedSetSemantics, self).__init__(cpp_type, name)
392 

Member Function Documentation

◆ merge()

def 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 393 of file semantics.py.

393  def merge(self, bb, aa):
394  for b in bb:
395  if b not in aa:
396  aa.append(b)
397  return aa
398 
399 

Member Data Documentation

◆ __handled_types__

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

Definition at line 385 of file semantics.py.


The documentation for this class was generated from the following file:
merge
int merge(const char *target, const char *source, bool fixup=false, bool dbg=true)
Definition: merge.C:430