The Gaudi Framework  v36r3 (83a1ddab)
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 437 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 440 of file semantics.py.

440  def __init__(self, cpp_type, name=None):
441  super(MappingSemantics, self).__init__(cpp_type, name)
442  template_args = list(extract_template_args(cpp_type))
443  self.key_semantics = getSemanticsFor(template_args[0])
444  self.value_semantics = getSemanticsFor(template_args[1])
445 

Member Function Documentation

◆ default()

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

Definition at line 451 of file semantics.py.

451  def default(self, value):
452  new_value = _DictHelper(self.key_semantics, self.value_semantics)
453  new_value.default = value
454  return new_value
455 

◆ opt_value()

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

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 456 of file semantics.py.

456  def opt_value(self, value):
457  """
458  Option string version of value.
459  """
460  if not isinstance(value, _DictHelper):
461  value = self.default(value)
462  return value.opt_value()
463 
464 

◆ store()

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

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 446 of file semantics.py.

446  def store(self, value):
447  new_value = _DictHelper(self.key_semantics, self.value_semantics)
448  new_value.update(value)
449  return new_value
450 

Member Data Documentation

◆ __handled_types__

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

Definition at line 438 of file semantics.py.

◆ key_semantics

GaudiConfig2.semantics.MappingSemantics.key_semantics

Definition at line 443 of file semantics.py.

◆ value_semantics

GaudiConfig2.semantics.MappingSemantics.value_semantics

Definition at line 444 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:237
GaudiConfig2.semantics.getSemanticsFor
def getSemanticsFor(cpp_type, name=None)
Definition: semantics.py:474
gaudirun.default
default
Definition: gaudirun.py:188