The Gaudi Framework  master (37c0b60a)
GaudiConfig2._db Namespace Reference

Classes

class  ConfDB2
 
class  ConfigurablesDB
 

Functions

def _normalize_cpp_type_name (name)
 
def split_namespace (typename)
 

Variables

 _DB
 
 _TRANS_TABLE
 

Function Documentation

◆ _normalize_cpp_type_name()

def GaudiConfig2._db._normalize_cpp_type_name (   name)
private
Translate a C++ type name (with templates etc.) to Python identifier.

Definition at line 59 of file _db.py.

59 def _normalize_cpp_type_name(name):
60  """
61  Translate a C++ type name (with templates etc.) to Python identifier.
62  """
63  return name.replace(", ", ",").translate(_TRANS_TABLE)
64 
65 

◆ split_namespace()

def GaudiConfig2._db.split_namespace (   typename)
Split a C++ qualified namespace in the tuple (top_namespace, rest) starting
searching the separator from pos.

>>> split_namespace('std::chrono::time_point')
('std', 'chrono::time_point')

Definition at line 66 of file _db.py.

66 def split_namespace(typename):
67  """
68  Split a C++ qualified namespace in the tuple (top_namespace, rest) starting
69  searching the separator from pos.
70 
71  >>> split_namespace('std::chrono::time_point')
72  ('std', 'chrono::time_point')
73  """
74  # find next namespace separator skipping template arguments
75  tpos = typename.find("<")
76  pos = typename.find("::")
77  # '<' can appear only in a class name, if we find a '::'
78  # earlier than a '<', then we got a namespace, else a class
79  if pos > 0 and (tpos < 0 or pos < tpos):
80  head = typename[:pos]
81  tail = typename[pos + 2 :]
82  else:
83  head = None
84  tail = typename
85  return (head, tail)
86 
87 

Variable Documentation

◆ _DB

GaudiConfig2._db._DB
private

Definition at line 53 of file _db.py.

◆ _TRANS_TABLE

GaudiConfig2._db._TRANS_TABLE
private

Definition at line 56 of file _db.py.

GaudiConfig2._db._normalize_cpp_type_name
def _normalize_cpp_type_name(name)
Definition: _db.py:59
GaudiConfig2._db.split_namespace
def split_namespace(typename)
Definition: _db.py:66