Gaudi Framework, version v23r5

Home   Generated: Wed Nov 28 2012
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
GaudiPython.Bindings.InterfaceCast Class Reference
Inheritance diagram for GaudiPython.Bindings.InterfaceCast:
Inheritance graph
[legend]
Collaboration diagram for GaudiPython.Bindings.InterfaceCast:
Collaboration graph
[legend]

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 
)

Definition at line 68 of file Bindings.py.

68 
69  def __init__(self, t ) :
70  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.

71 
72  def __call__(self, obj) :
73  if obj :
74  ip = PyCintex.libPyROOT.MakeNullPointer(self.type)
75  try:
76  if obj.queryInterface(self.type.interfaceID(), ip).isSuccess() :
77  return ip
78  else :
79  print "ERROR: queryInterface failed for", obj, "interface:", self.type
80  except Exception, e:
81  print "ERROR: exception", e, "caught when retrieving interface", self.type, "for object", obj
82  import traceback
83  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 70 of file Bindings.py.


The documentation for this class was generated from the following file:
Generated at Wed Nov 28 2012 12:17:40 for Gaudi Framework, version v23r5 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004