Gaudi Framework, version v25r2
Home
Generated: Wed Jun 4 2014
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
.cern.ch
sw
Gaudi
releases
GAUDI
GAUDI_v25r2
GaudiPython
GaudiPython
Interface.h
Go to the documentation of this file.
1
// $Id: Interface.h,v 1.8 2005/11/08 16:31:03 mato Exp $
2
// ============================================================================
3
#ifndef GAUDIPYTHON_INTERFACE_H
4
#define GAUDIPYTHON_INTERFACE_H 1
5
// ============================================================================
6
// Include files
7
// ============================================================================
8
// STD & STL
9
// ============================================================================
10
#include <functional>
11
// ============================================================================
12
// GaudiKernel
13
// ============================================================================
14
#include "
GaudiKernel/IInterface.h
"
15
#include "
GaudiKernel/SmartIF.h
"
16
// ============================================================================
17
// GaudiPython
18
// ============================================================================
19
#include "
GaudiPython/GaudiPython.h
"
20
// ============================================================================
21
22
namespace
GaudiPython
23
{
34
template
<
class
TYPE>
35
struct
Interface
/* :
36
public std::unary_function<const IInterface*,TYPE*> */
37
{
42
TYPE*
operator()
(
const
IInterface
* in )
const
43
{
return
SmartIF<TYPE>
( TYPE::interfaceID() ,
44
const_cast<
IInterface
*
>
( in ) ) ; }
45
50
static
TYPE*
cast
(
const
IInterface
* in )
51
{
return
SmartIF<TYPE>
(
const_cast<
IInterface
*
>
( in ) ) ; }
52
58
static
TYPE*
cast
(
const
InterfaceID
& iid ,
59
const
IInterface
* in )
60
{
return
SmartIF<TYPE>
( iid ,
const_cast<
IInterface
*
>
( in ) ) ; }
61
62
};
63
64
template
<>
65
struct
Interface
<
IInterface
> :
66
public
std::unary_function<const IInterface*,IInterface*>
67
{
68
typedef
IInterface
TYPE
;
73
TYPE
*
operator()
(
const
IInterface
* in )
const
74
{
return
SmartIF<TYPE>
(
const_cast<
IInterface
*
>
( in ) ) ; }
75
80
static
TYPE
*
cast
(
const
IInterface
* in )
81
{
return
SmartIF<TYPE>
(
const_cast<
IInterface
*
>
( in ) ) ; }
82
88
static
TYPE
*
cast
(
const
InterfaceID
&
/* iid */
,
89
const
IInterface
* in )
90
{
return
SmartIF<TYPE>
(
const_cast<
IInterface
*
>
( in ) ) ; }
91
92
};
93
94
}
// end of namespace GaudiPython
95
96
#endif // GAUDIPYTHON_INTERFACE_H
Generated at Wed Jun 4 2014 14:48:58 for Gaudi Framework, version v25r2 by
Doxygen
version 1.8.2 written by
Dimitri van Heesch
, © 1997-2004