Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  master (01b473db)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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)
 
def name (self)
 
def name (self, value)
 
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
 cpp_type
 

Private Attributes

 _name
 

Static Private Attributes

 __handled_types__
 

Detailed Description

Definition at line 671 of file semantics.py.

Constructor & Destructor Documentation

◆ __init__()

def GaudiConfig2.semantics.MappingSemantics.__init__ (   self,
  cpp_type 
)

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 674 of file semantics.py.

674  def __init__(self, cpp_type):
675  super(MappingSemantics, self).__init__(cpp_type)
676  template_args = list(extract_template_args(cpp_type))
677  self.key_semantics = getSemanticsFor(template_args[0])
678  self.value_semantics = getSemanticsFor(template_args[1])
679 

Member Function Documentation

◆ default()

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

Definition at line 696 of file semantics.py.

696  def default(self, value):
697  new_value = _DictHelper(self.key_semantics, self.value_semantics)
698  new_value.default = value
699  return new_value
700 

◆ name() [1/2]

def GaudiConfig2.semantics.MappingSemantics.name (   self)

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 681 of file semantics.py.

681  def name(self):
682  return self._name
683 

◆ name() [2/2]

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

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 685 of file semantics.py.

685  def name(self, value):
686  self._name = value
687  self.key_semantics.name = "{} key".format(self._name)
688  self.value_semantics.name = "{} value".format(self._name)
689 

◆ opt_value()

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

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 701 of file semantics.py.

701  def opt_value(self, value):
702  """
703  Option string version of value.
704  """
705  if not isinstance(value, _DictHelper):
706  value = self.default(value)
707  return value.opt_value()
708 
709 

◆ store()

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

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 690 of file semantics.py.

690  def store(self, value):
691  # No explicit type checking as anything else than dict fails in update call
692  new_value = _DictHelper(self.key_semantics, self.value_semantics)
693  new_value.update(value)
694  return new_value
695 

Member Data Documentation

◆ __handled_types__

GaudiConfig2.semantics.MappingSemantics.__handled_types__
staticprivate

Definition at line 672 of file semantics.py.

◆ _name

GaudiConfig2.semantics.MappingSemantics._name
private

Definition at line 686 of file semantics.py.

◆ key_semantics

GaudiConfig2.semantics.MappingSemantics.key_semantics

Definition at line 677 of file semantics.py.

◆ value_semantics

GaudiConfig2.semantics.MappingSemantics.value_semantics

Definition at line 678 of file semantics.py.


The documentation for this class was generated from the following file:
GaudiConfig2.semantics.getSemanticsFor
def getSemanticsFor(cpp_type, strict=False)
Definition: semantics.py:719
GaudiConfig2.semantics.extract_template_args
def extract_template_args(cpp_type)
Definition: semantics.py:351
gaudirun.default
default
Definition: gaudirun.py:188
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:93
ConditionsStallTest.name
name
Definition: ConditionsStallTest.py:77