The Gaudi Framework  v37r0 (b608885e)
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 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 478 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 481 of file semantics.py.

481  def __init__(self, cpp_type, name=None):
482  super(MappingSemantics, self).__init__(cpp_type, name)
483  template_args = list(extract_template_args(cpp_type))
484  self.key_semantics = getSemanticsFor(template_args[0])
485  self.key_semantics.name = "{} key".format(name)
486  self.value_semantics = getSemanticsFor(template_args[1])
487  self.value_semantics.name = "{} value".format(name)
488 

Member Function Documentation

◆ default()

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

Definition at line 504 of file semantics.py.

504  def default(self, value):
505  new_value = _DictHelper(self.key_semantics, self.value_semantics)
506  new_value.default = value
507  return new_value
508 

◆ name() [1/2]

def GaudiConfig2.semantics.MappingSemantics.name (   self)

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 490 of file semantics.py.

490  def name(self):
491  return self._name
492 

◆ name() [2/2]

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

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 494 of file semantics.py.

494  def name(self, value):
495  self._name = value
496  self.key_semantics.name = "{} key".format(self._name)
497  self.value_semantics.name = "{} value".format(self._name)
498 

◆ opt_value()

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

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 509 of file semantics.py.

509  def opt_value(self, value):
510  """
511  Option string version of value.
512  """
513  if not isinstance(value, _DictHelper):
514  value = self.default(value)
515  return value.opt_value()
516 
517 

◆ store()

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

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 499 of file semantics.py.

499  def store(self, value):
500  new_value = _DictHelper(self.key_semantics, self.value_semantics)
501  new_value.update(value)
502  return new_value
503 

Member Data Documentation

◆ __handled_types__

GaudiConfig2.semantics.MappingSemantics.__handled_types__
staticprivate

Definition at line 479 of file semantics.py.

◆ _name

GaudiConfig2.semantics.MappingSemantics._name
private

Definition at line 495 of file semantics.py.

◆ key_semantics

GaudiConfig2.semantics.MappingSemantics.key_semantics

Definition at line 484 of file semantics.py.

◆ value_semantics

GaudiConfig2.semantics.MappingSemantics.value_semantics

Definition at line 486 of file semantics.py.


The documentation for this class was generated from the following file:
bug_34121.name
name
Definition: bug_34121.py:20
GaudiConfig2.semantics.extract_template_args
def extract_template_args(cpp_type)
Definition: semantics.py:268
GaudiConfig2.semantics.getSemanticsFor
def getSemanticsFor(cpp_type, name=None)
Definition: semantics.py:527
gaudirun.default
default
Definition: gaudirun.py:190
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:119