| # Gaudi Framework, version v23r1 |

Home |  | Generated: Wed Feb 29 2012

Public Member Functions | Public Attributes | Static Public Attributes

# GaudiPython::Bindings::InterfaceCast Class Reference

Inheritance diagram for GaudiPython::Bindings::InterfaceCast:
[legend]

List of all members.

## Public Member Functions
def | __init__
def | __call__
## Public Attributes
| type
## Static Public Attributes
| cast = __call__

## Detailed Description

    Helper class to obtain the adequate interface from a component
        by using the Gaudi queryInterface() mechanism

Definition at line 65 of file Bindings.py.

## Constructor & Destructor Documentation

def GaudiPython::Bindings::InterfaceCast::__init__ | ( |  | self,
|  |  | t
| ) |  |

Reimplemented in GaudiPython::Bindings::Interface.

Definition at line 68 of file Bindings.py.

    00069                            :
    00070         if type(t) is str : t = PyCintex.makeClass(t)
            self.type = t

## Member Function Documentation

def GaudiPython::Bindings::InterfaceCast::__call__ | ( |  | self,
|  |  | obj
| ) |  |

Definition at line 71 of file Bindings.py.

    00072                             :
    00073         if obj :
    00074             ip = PyCintex.libPyROOT.MakeNullPointer(self.type)
    00075             try:
    00076                 if obj.queryInterface(self.type.interfaceID(), ip).isSuccess() :
    00077                     return ip
    00078                 else :
    00079                     print "ERROR: queryInterface failed for", obj, "interface:", self.type
    00080             except Exception, e:
    00081                 print "ERROR: exception", e, "caught when retrieving interface", self.type, "for object", obj
    00082                 import traceback
    00083                 traceback.print_stack()
            return None

## Member Data Documentation

GaudiPython::Bindings::InterfaceCast::cast = __call__`[static]`

Definition at line 84 of file Bindings.py.

GaudiPython::Bindings::InterfaceCast::type

Definition at line 68 of file Bindings.py.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v23r1/GaudiPython/python/GaudiPython/Bindings.py

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