Adds object like functionality to the standard dictionary.
Definition at line 57 of file GenerateGaudiOpts.py.
◆ __init__()
def GenerateGaudiOpts.XmlDictObject.__init__ |
( |
|
self, |
|
|
|
initdict = None |
|
) |
| |
Definition at line 62 of file GenerateGaudiOpts.py.
62 def __init__(self, initdict=None):
65 dict.__init__(self, initdict)
◆ __getattr__()
def GenerateGaudiOpts.XmlDictObject.__getattr__ |
( |
|
self, |
|
|
|
item |
|
) |
| |
◆ __setattr__()
def GenerateGaudiOpts.XmlDictObject.__setattr__ |
( |
|
self, |
|
|
|
item, |
|
|
|
value |
|
) |
| |
Definition at line 70 of file GenerateGaudiOpts.py.
70 def __setattr__(self, item, value):
71 self.__setitem__(item, value)
◆ __str__()
def GenerateGaudiOpts.XmlDictObject.__str__ |
( |
|
self | ) |
|
◆ _UnWrap()
def GenerateGaudiOpts.XmlDictObject._UnWrap |
( |
|
x | ) |
|
|
staticprivate |
Definition at line 93 of file GenerateGaudiOpts.py.
94 if isinstance(x, dict):
95 return dict((k, XmlDictObject._UnWrap(v))
for (k, v)
in x.iteritems())
96 elif isinstance(x, list):
97 return [XmlDictObject._UnWrap(v)
for v
in x]
◆ UnWrap()
def GenerateGaudiOpts.XmlDictObject.UnWrap |
( |
|
self | ) |
|
Recursively converts an XmlDictObject to a standard dictionary and returns the result.
Definition at line 101 of file GenerateGaudiOpts.py.
103 Recursively converts an XmlDictObject to a standard dictionary and returns the result.
106 return XmlDictObject._UnWrap(self)
◆ Wrap()
def GenerateGaudiOpts.XmlDictObject.Wrap |
( |
|
x | ) |
|
|
static |
Static method to wrap a dictionary recursively as an XmlDictObject
Definition at line 80 of file GenerateGaudiOpts.py.
82 Static method to wrap a dictionary recursively as an XmlDictObject
85 if isinstance(x, dict):
86 return XmlDictObject((k, XmlDictObject.Wrap(v))
for (k, v)
in x.iteritems())
87 elif isinstance(x, list):
88 return [XmlDictObject.Wrap(v)
for v
in x]
The documentation for this class was generated from the following file: