The Gaudi Framework  v36r1 (3e2fb5a8)
GaudiConfig2.semantics.MappingSemantics Class Reference
Inheritance diagram for GaudiConfig2.semantics.MappingSemantics:
Collaboration diagram for GaudiConfig2.semantics.MappingSemantics:

Public Member Functions

def __init__ (self, cpp_type, name=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)
 
def merge (self, a, b)
 

Public Attributes

 key_semantics
 
 value_semantics
 
- Public Attributes inherited from GaudiConfig2.semantics.PropertySemantics
 name
 
 cpp_type
 

Static Private Attributes

tuple __handled_types__ = (re.compile(r'(std::)?(unordered_)?map<.*>$'), )
 

Detailed Description

Definition at line 416 of file semantics.py.

Constructor & Destructor Documentation

◆ __init__()

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

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 419 of file semantics.py.

419  def __init__(self, cpp_type, name=None):
420  super(MappingSemantics, self).__init__(cpp_type, name)
421  template_args = list(extract_template_args(cpp_type))
422  self.key_semantics = getSemanticsFor(template_args[0])
423  self.value_semantics = getSemanticsFor(template_args[1])
424 

Member Function Documentation

◆ default()

def GaudiConfig2.semantics.MappingSemantics.default (   self,
  value 
)

Definition at line 430 of file semantics.py.

430  def default(self, value):
431  new_value = _DictHelper(self.key_semantics, self.value_semantics)
432  new_value.default = value
433  return new_value
434 

◆ opt_value()

def GaudiConfig2.semantics.MappingSemantics.opt_value (   self,
  value 
)
Option string version of value.

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 435 of file semantics.py.

435  def opt_value(self, value):
436  '''
437  Option string version of value.
438  '''
439  if not isinstance(value, _DictHelper):
440  value = self.default(value)
441  return value.opt_value()
442 
443 

◆ store()

def GaudiConfig2.semantics.MappingSemantics.store (   self,
  value 
)
Validation/transformation of the data to be stored.

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 425 of file semantics.py.

425  def store(self, value):
426  new_value = _DictHelper(self.key_semantics, self.value_semantics)
427  new_value.update(value)
428  return new_value
429 

Member Data Documentation

◆ __handled_types__

tuple GaudiConfig2.semantics.MappingSemantics.__handled_types__ = (re.compile(r'(std::)?(unordered_)?map<.*>$'), )
staticprivate

Definition at line 417 of file semantics.py.

◆ key_semantics

GaudiConfig2.semantics.MappingSemantics.key_semantics

Definition at line 422 of file semantics.py.

◆ value_semantics

GaudiConfig2.semantics.MappingSemantics.value_semantics

Definition at line 423 of file semantics.py.


The documentation for this class was generated from the following file:
GaudiConfig2.semantics.extract_template_args
def extract_template_args(cpp_type)
Definition: semantics.py:216
GaudiConfig2.semantics.getSemanticsFor
def getSemanticsFor(cpp_type, name=None)
Definition: semantics.py:450
gaudirun.default
default
Definition: gaudirun.py:181