LCIO  "2.7.4"
 All Classes Namespaces Functions Variables Typedefs Friends Pages
cpointer.h
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>
17 typedef std::vector<PTRTYPE> PointerVec ;
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