| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

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

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

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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__
def | __getattr__
def | __setattr__
def | __str__
def | UnWrap

## Static Public Member Functions
def | Wrap

## Static Private Member Functions
def | _UnWrap

## Detailed Description

    Adds object like functionality to the standard dictionary.

Definition at line 42 of file GenerateGaudiOpts.py.

## Constructor & Destructor Documentation

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

Definition at line 47 of file GenerateGaudiOpts.py.

47
48 def __init__(self, initdict=None):
49 if initdict is None:
50 initdict = {}
51 dict.__init__(self, initdict)

## Member Function Documentation

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

Definition at line 52 of file GenerateGaudiOpts.py.

52
53 def __getattr__(self, item):
54 return self.__getitem__(item)

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

Definition at line 55 of file GenerateGaudiOpts.py.

55
56 def __setattr__(self, item, value):
57 self.__setitem__(item, value)

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

Definition at line 58 of file GenerateGaudiOpts.py.

58
59 def __str__(self):
60 if self.has_key('_text'):
61 return self.__getitem__('_text')
62 else:
63 return ''

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

Definition at line 78 of file GenerateGaudiOpts.py.

78
79 def _UnWrap(x):
80 if isinstance(x, dict):
81 return dict((k, XmlDictObject._UnWrap(v)) for (k, v) in x.iteritems())
82 elif isinstance(x, list):
83 return [XmlDictObject._UnWrap(v) for v in x]
84 else:
85 return x

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

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

Definition at line 86 of file GenerateGaudiOpts.py.

86
87 def UnWrap(self):
88 """
89 Recursively converts an XmlDictObject to a standard dictionary and returns the result.
90 """
91
92 return XmlDictObject._UnWrap(self)

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

    Static method to wrap a dictionary recursively as an XmlDictObject

Definition at line 65 of file GenerateGaudiOpts.py.

65
66 def Wrap(x):
67 """
68 Static method to wrap a dictionary recursively as an XmlDictObject
69 """
70
71 if isinstance(x, dict):
72 return XmlDictObject((k, XmlDictObject.Wrap(v)) for (k, v) in x.iteritems())
73 elif isinstance(x, list):
74 return [XmlDictObject.Wrap(v) for v in x]
75 else:
76 return x

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/GaudiProfiling/python/GaudiProfiling/GenerateGaudiOpts.py