| The Gaudi Framework v30r0 (c919700c)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | Static Public Attributes | List of all members
GaudiPython.Bindings.InterfaceCast Class Reference
Inheritance diagram for GaudiPython.Bindings.InterfaceCast:
[legend]
Collaboration diagram for GaudiPython.Bindings.InterfaceCast:
[legend]

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

## Constructor & Destructor Documentation

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

Definition at line 97 of file Bindings.py.

97 def __init__(self, t):
98 if type(t) is str:
99 t = getattr(gbl, t)
100 self.type = t
101
GaudiPython.Bindings.InterfaceCast.type
type
Definition: Bindings.py:100
GaudiPython.Bindings.InterfaceCast.__init__
def __init__(self, t)
Definition: Bindings.py:97

## Member Function Documentation

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

Definition at line 102 of file Bindings.py.

102 def __call__(self, obj):
103 if obj:
104 ip = makeNullPointer(self.type)
105 try:
106 if obj.queryInterface(self.type.interfaceID(), ip).isSuccess():
107 return ip
108 else:
109 print "ERROR: queryInterface failed for", obj, "interface:", self.type
110 except Exception, e:
111 print "ERROR: exception", e, "caught when retrieving interface", self.type, "for object", obj
112 import traceback
113 traceback.print_stack()
114 return None
GaudiPython.Bindings.makeNullPointer
makeNullPointer
Definition: Bindings.py:83
GaudiPython.Bindings.InterfaceCast.type
type
Definition: Bindings.py:100
GaudiPython.Bindings.InterfaceCast.__call__
def __call__(self, obj)
Definition: Bindings.py:102

## Member Data Documentation

GaudiPython.Bindings.InterfaceCast.cast = __call__
| static

Definition at line 115 of file Bindings.py.

GaudiPython.Bindings.InterfaceCast.type

Definition at line 100 of file Bindings.py.

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

- GaudiPython/python/GaudiPython/Bindings.py