Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v28r2p1 (f1a77ff4)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
GaudiPython.Bindings.InterfaceCast Class Reference
Inheritance diagram for GaudiPython.Bindings.InterfaceCast:
Collaboration diagram for GaudiPython.Bindings.InterfaceCast:

Public Member Functions

def __init__ (self, t)
 
def __call__ (self, obj)
 

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 86 of file Bindings.py.

Constructor & Destructor Documentation

def GaudiPython.Bindings.InterfaceCast.__init__ (   self,
  t 
)

Definition at line 89 of file Bindings.py.

89  def __init__(self, t ) :
90  if type(t) is str:
91  t = getattr(gbl, t)
92  self.type = t

Member Function Documentation

def GaudiPython.Bindings.InterfaceCast.__call__ (   self,
  obj 
)

Definition at line 93 of file Bindings.py.

93  def __call__(self, obj) :
94  if obj :
95  ip = makeNullPointer(self.type)
96  try:
97  if obj.queryInterface(self.type.interfaceID(), ip).isSuccess() :
98  return ip
99  else :
100  print "ERROR: queryInterface failed for", obj, "interface:", self.type
101  except Exception, e:
102  print "ERROR: exception", e, "caught when retrieving interface", self.type, "for object", obj
103  import traceback
104  traceback.print_stack()
105  return None

Member Data Documentation

GaudiPython.Bindings.InterfaceCast.cast = __call__
static

Definition at line 106 of file Bindings.py.

GaudiPython.Bindings.InterfaceCast.type

Definition at line 92 of file Bindings.py.


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