The Gaudi Framework  v36r16 (ea80daf8)
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

 __handled_types__
 

Detailed Description

Definition at line 470 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 473 of file semantics.py.

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

Member Function Documentation

◆ default()

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

Definition at line 484 of file semantics.py.

484  def default(self, value):
485  new_value = _DictHelper(self.key_semantics, self.value_semantics)
486  new_value.default = value
487  return new_value
488 

◆ opt_value()

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

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 489 of file semantics.py.

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

◆ store()

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

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 479 of file semantics.py.

479  def store(self, value):
480  new_value = _DictHelper(self.key_semantics, self.value_semantics)
481  new_value.update(value)
482  return new_value
483 

Member Data Documentation

◆ __handled_types__

GaudiConfig2.semantics.MappingSemantics.__handled_types__
staticprivate

Definition at line 471 of file semantics.py.

◆ key_semantics

GaudiConfig2.semantics.MappingSemantics.key_semantics

Definition at line 476 of file semantics.py.

◆ value_semantics

GaudiConfig2.semantics.MappingSemantics.value_semantics

Definition at line 477 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:507
gaudirun.default
default
Definition: gaudirun.py:190