| The Gaudi Framework v27r1

- 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__
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 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 def __init__(self, initdict=None):
48 if initdict is None:
49 initdict = {}
50 dict.__init__(self, initdict)
51
GaudiProfiling.GenerateGaudiOpts.XmlDictObject.__init__
def __init__
Definition: GenerateGaudiOpts.py:47

## Member Function Documentation

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

Definition at line 52 of file GenerateGaudiOpts.py.

52 def __getattr__(self, item):
53 return self.__getitem__(item)
54
GaudiProfiling.GenerateGaudiOpts.XmlDictObject.__getattr__
def __getattr__(self, item)
Definition: GenerateGaudiOpts.py:52

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

Definition at line 55 of file GenerateGaudiOpts.py.

55 def __setattr__(self, item, value):
56 self.__setitem__(item, value)
57
GaudiProfiling.GenerateGaudiOpts.XmlDictObject.__setattr__
def __setattr__(self, item, value)
Definition: GenerateGaudiOpts.py:55

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

Definition at line 58 of file GenerateGaudiOpts.py.

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

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

Definition at line 78 of file GenerateGaudiOpts.py.

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

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 def UnWrap(self):
87 """
88 Recursively converts an XmlDictObject to a standard dictionary and returns the result.
89 """
90
91 return XmlDictObject._UnWrap(self)
92
GaudiProfiling.GenerateGaudiOpts.XmlDictObject.UnWrap
def UnWrap(self)
Definition: GenerateGaudiOpts.py:86

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 def Wrap(x):
66 """
67 Static method to wrap a dictionary recursively as an XmlDictObject
68 """
69
70 if isinstance(x, dict):
71 return XmlDictObject((k, XmlDictObject.Wrap(v)) for (k, v) in x.iteritems())
72 elif isinstance(x, list):
73 return [XmlDictObject.Wrap(v) for v in x]
74 else:
75 return x
76
GaudiProfiling.GenerateGaudiOpts.XmlDictObject
Definition: GenerateGaudiOpts.py:42
GaudiProfiling.GenerateGaudiOpts.XmlDictObject.Wrap
def Wrap(x)
Definition: GenerateGaudiOpts.py:65

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

- GaudiProfiling/python/GaudiProfiling/GenerateGaudiOpts.py