The Gaudi Framework  v36r9 (fd2bdac3)
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 473 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 476 of file semantics.py.

476  def __init__(self, cpp_type, name=None):
477  super(MappingSemantics, self).__init__(cpp_type, name)
478  template_args = list(extract_template_args(cpp_type))
479  self.key_semantics = getSemanticsFor(template_args[0])
480  self.value_semantics = getSemanticsFor(template_args[1])
481 

Member Function Documentation

◆ default()

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

Definition at line 487 of file semantics.py.

487  def default(self, value):
488  new_value = _DictHelper(self.key_semantics, self.value_semantics)
489  new_value.default = value
490  return new_value
491 

◆ opt_value()

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

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 492 of file semantics.py.

492  def opt_value(self, value):
493  """
494  Option string version of value.
495  """
496  if not isinstance(value, _DictHelper):
497  value = self.default(value)
498  return value.opt_value()
499 
500 

◆ store()

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

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 482 of file semantics.py.

482  def store(self, value):
483  new_value = _DictHelper(self.key_semantics, self.value_semantics)
484  new_value.update(value)
485  return new_value
486 

Member Data Documentation

◆ __handled_types__

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

Definition at line 474 of file semantics.py.

◆ key_semantics

GaudiConfig2.semantics.MappingSemantics.key_semantics

Definition at line 479 of file semantics.py.

◆ value_semantics

GaudiConfig2.semantics.MappingSemantics.value_semantics

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