The Gaudi Framework  v33r0 (d5ea422b)
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 375 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 378 of file semantics.py.

378  def __init__(self, cpp_type, name=None):
379  super(MappingSemantics, self).__init__(cpp_type, name)
380  template_args = list(extract_template_args(cpp_type))
381  self.key_semantics = getSemanticsFor(template_args[0])
382  self.value_semantics = getSemanticsFor(template_args[1])
383 
def getSemanticsFor(cpp_type, name=None)
Definition: semantics.py:409
def extract_template_args(cpp_type)
Definition: semantics.py:206

Member Function Documentation

◆ default()

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

Definition at line 389 of file semantics.py.

389  def default(self, value):
390  new_value = _DictHelper(self.key_semantics, self.value_semantics)
391  new_value.default = value
392  return new_value
393 

◆ opt_value()

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

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 394 of file semantics.py.

394  def opt_value(self, value):
395  '''
396  Option string version of value.
397  '''
398  if not isinstance(value, _DictHelper):
399  value = self.default(value)
400  return value.opt_value()
401 
402 

◆ store()

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

Reimplemented from GaudiConfig2.semantics.PropertySemantics.

Definition at line 384 of file semantics.py.

384  def store(self, value):
385  new_value = _DictHelper(self.key_semantics, self.value_semantics)
386  new_value.update(value)
387  return new_value
388 

Member Data Documentation

◆ __handled_types__

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

Definition at line 376 of file semantics.py.

◆ key_semantics

GaudiConfig2.semantics.MappingSemantics.key_semantics

Definition at line 381 of file semantics.py.

◆ value_semantics

GaudiConfig2.semantics.MappingSemantics.value_semantics

Definition at line 382 of file semantics.py.


The documentation for this class was generated from the following file: