| The Gaudi Framework v29r1 (5cd95fa2)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Static Private Member Functions | List of all members
GaudiProfiling.GenerateGaudiOpts.XmlDictObject Class Reference
Inheritance diagram for GaudiProfiling.GenerateGaudiOpts.XmlDictObject:
[legend]
Collaboration diagram for GaudiProfiling.GenerateGaudiOpts.XmlDictObject:
[legend]

## Public Member Functions
def | __init__ (self, initdict=None)
def | __getattr__ (self, item)
def | __setattr__ (self, item, value)
def | __str__ (self)
def | UnWrap (self)

## Static Public Member Functions
def | Wrap (x)

## Static Private Member Functions
def | _UnWrap (x)

## Detailed Description

    Adds object like functionality to the standard dictionary.

Definition at line 47 of file GenerateGaudiOpts.py.

## Constructor & Destructor Documentation

def GaudiProfiling.GenerateGaudiOpts.XmlDictObject.__init__ | ( |  | self,
|  |  | initdict = `None`
| ) |  |

Definition at line 52 of file GenerateGaudiOpts.py.

52 def __init__(self, initdict=None):
53 if initdict is None:
54 initdict = {}
55 dict.__init__(self, initdict)
56
GaudiProfiling.GenerateGaudiOpts.XmlDictObject.__init__
def __init__(self, initdict=None)
Definition: GenerateGaudiOpts.py:52

## Member Function Documentation

def GaudiProfiling.GenerateGaudiOpts.XmlDictObject.__getattr__ | ( |  | self,
|  |  | item
| ) |  |

Definition at line 57 of file GenerateGaudiOpts.py.

57 def __getattr__(self, item):
58 return self.__getitem__(item)
59
GaudiProfiling.GenerateGaudiOpts.XmlDictObject.__getattr__
def __getattr__(self, item)
Definition: GenerateGaudiOpts.py:57

def GaudiProfiling.GenerateGaudiOpts.XmlDictObject.__setattr__ | ( |  | self,
|  |  | item,
|  |  | value
| ) |  |

Definition at line 60 of file GenerateGaudiOpts.py.

60 def __setattr__(self, item, value):
61 self.__setitem__(item, value)
62
GaudiProfiling.GenerateGaudiOpts.XmlDictObject.__setattr__
def __setattr__(self, item, value)
Definition: GenerateGaudiOpts.py:60

def GaudiProfiling.GenerateGaudiOpts.XmlDictObject.__str__ | ( |  | self | ) |

Definition at line 63 of file GenerateGaudiOpts.py.

63 def __str__(self):
64 if self.has_key('_text'):
65 return self.__getitem__('_text')
66 else:
67 return ''
68
GaudiProfiling.GenerateGaudiOpts.XmlDictObject.__str__
def __str__(self)
Definition: GenerateGaudiOpts.py:63

def GaudiProfiling.GenerateGaudiOpts.XmlDictObject._UnWrap | ( |  | x | ) |
| static private

Definition at line 83 of file GenerateGaudiOpts.py.

83 def _UnWrap(x):
84 if isinstance(x, dict):
85 return dict((k, XmlDictObject._UnWrap(v)) for (k, v) in x.iteritems())
86 elif isinstance(x, list):
87 return [XmlDictObject._UnWrap(v) for v in x]
88 else:
89 return x
90
GaudiProfiling.GenerateGaudiOpts.XmlDictObject._UnWrap
def _UnWrap(x)
Definition: GenerateGaudiOpts.py:83

def GaudiProfiling.GenerateGaudiOpts.XmlDictObject.UnWrap | ( |  | self | ) |

    Recursively converts an XmlDictObject to a standard dictionary and returns the result.

Definition at line 91 of file GenerateGaudiOpts.py.

91 def UnWrap(self):
92 """
93 Recursively converts an XmlDictObject to a standard dictionary and returns the result.
94 """
95
96 return XmlDictObject._UnWrap(self)
97
98
GaudiProfiling.GenerateGaudiOpts.XmlDictObject.UnWrap
def UnWrap(self)
Definition: GenerateGaudiOpts.py:91

def GaudiProfiling.GenerateGaudiOpts.XmlDictObject.Wrap | ( |  | x | ) |
| static

    Static method to wrap a dictionary recursively as an XmlDictObject

Definition at line 70 of file GenerateGaudiOpts.py.

70 def Wrap(x):
71 """
72 Static method to wrap a dictionary recursively as an XmlDictObject
73 """
74
75 if isinstance(x, dict):
76 return XmlDictObject((k, XmlDictObject.Wrap(v)) for (k, v) in x.iteritems())
77 elif isinstance(x, list):
78 return [XmlDictObject.Wrap(v) for v in x]
79 else:
80 return x
81
GaudiProfiling.GenerateGaudiOpts.XmlDictObject
Definition: GenerateGaudiOpts.py:47
GaudiProfiling.GenerateGaudiOpts.XmlDictObject.Wrap
def Wrap(x)
Definition: GenerateGaudiOpts.py:70

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

- GaudiProfiling/python/GaudiProfiling/GenerateGaudiOpts.py