The Gaudi Framework  master (2c9e87c2)
Loading...
Searching...
No Matches
GaudiConfig2._db Namespace Reference

Classes

class  ConfDB2
class  ConfigurablesDB

Functions

 _normalize_cpp_type_name (name)
 split_namespace (typename)

Variables

 _DB = ConfDB2()
 _TRANS_TABLE = str.maketrans("<>&*,: ().", "__rp__s___")

Function Documentation

◆ _normalize_cpp_type_name()

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

Definition at line 61 of file _db.py.

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

◆ split_namespace()

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 68 of file _db.py.

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

Variable Documentation

◆ _DB

GaudiConfig2._db._DB = ConfDB2()
protected

Definition at line 55 of file _db.py.

◆ _TRANS_TABLE

GaudiConfig2._db._TRANS_TABLE = str.maketrans("<>&*,: ().", "__rp__s___")
protected

Definition at line 58 of file _db.py.