LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cpointer.h
Go to the documentation of this file.
1 
9 #ifndef CPOINTER_H
10 #define CPOINTER_H 1
11 
12 typedef long PTRTYPE ;
13 #define CFORTRANPNTR LONG
14 #define CFORTRANPNTRV LONGV
15 
16 #include <vector>
18 
24 template<class T, class O> T* f2c_pointer(PTRTYPE ptr){
25 
26  if(! (ptr) ) return 0 ;
27 
28  O* o_ptr = reinterpret_cast<O*>( ptr ) ;
29 
30  return dynamic_cast<T*>( o_ptr ) ;
31 }
32 
33 #define C2F_POINTER(T,ptr) reinterpret_cast<PTRTYPE>( dynamic_cast<T>( (ptr) ) )
34 
35 #endif
T * f2c_pointer(PTRTYPE ptr)
Template for casting from integers to LCIO classes First template is the resulting type...
Definition: cpointer.h:24
long PTRTYPE
Fortran interface - define the length of pointers this has to made machine independent ...
Definition: cpointer.h:12
std::vector< PTRTYPE > PointerVec
Definition: cpointer.h:17