| # Gaudi Framework, version v22r2 |

Home |  | Generated: Tue May 10 2011

Public Member Functions | Private Member Functions

# GaudiProfiling::GenerateGaudiOpts::XmlDictObject Class Reference

List of all members.

## Public Member Functions
def | __init__
def | __getattr__
def | __setattr__
def | __str__
def | Wrap
def | UnWrap
## 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.

    00048                                      :
    00049         if initdict is None:
    00050             initdict = {}
    00051         dict.__init__(self, initdict)

## Member Function Documentation

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

Definition at line 52 of file GenerateGaudiOpts.py.

    00053                                :
    00054         return self.__getitem__(item)

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

Definition at line 55 of file GenerateGaudiOpts.py.

    00056                                       :
    00057         self.__setitem__(item, value)

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

Definition at line 58 of file GenerateGaudiOpts.py.

    00059                      :
    00060         if self.has_key('_text'):
    00061             return self.__getitem__('_text')
    00062         else:
    00063             return ''

def GaudiProfiling::GenerateGaudiOpts::XmlDictObject::_UnWrap | ( |  | x ) | `[private]`

Definition at line 78 of file GenerateGaudiOpts.py.

    00079                   :
    00080         if isinstance(x, dict):
    00081             return dict((k, XmlDictObject._UnWrap(v)) for (k, v) in x.iteritems())
    00082         elif isinstance(x, list):
    00083             return [XmlDictObject._UnWrap(v) for v in x]
    00084         else:
    00085             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.

    00087                     :
    00088         """
    00089         Recursively converts an XmlDictObject to a standard dictionary and returns the result.
    00090         """
    00091
    00092         return XmlDictObject._UnWrap(self)

def GaudiProfiling::GenerateGaudiOpts::XmlDictObject::Wrap | ( |  | x ) |

    Static method to wrap a dictionary recursively as an XmlDictObject

Definition at line 65 of file GenerateGaudiOpts.py.

    00066                :
    00067         """
    00068         Static method to wrap a dictionary recursively as an XmlDictObject
    00069         """
    00070
    00071         if isinstance(x, dict):
    00072             return XmlDictObject((k, XmlDictObject.Wrap(v)) for (k, v) in x.iteritems())
    00073         elif isinstance(x, list):
    00074             return [XmlDictObject.Wrap(v) for v in x]
    00075         else:
    00076             return x

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

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

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines