Gaudi Framework, version v22r4

Home   Generated: Fri Sep 2 2011
Public Member Functions | Public Attributes | Static Public Attributes

GaudiPython::Bindings::InterfaceCast Class Reference

Inheritance diagram for GaudiPython::Bindings::InterfaceCast:
Inheritance graph
[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

Definition at line 84 of file Bindings.py.

Definition at line 68 of file Bindings.py.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated at Fri Sep 2 2011 16:26:01 for Gaudi Framework, version v22r4 by Doxygen version 1.7.2 written by Dimitri van Heesch, © 1997-2004