Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

PseudoNew1P.h

Go to the documentation of this file.
00001 // 
00002 // Copyright (C) CERN, Geneva 
00003 // 
00004 
00005 #ifndef _PSEUDONEW1P_H
00006 #define _PSEUDONEW1P_H
00007 
00028 template <class T1, class T2 > class PseudoNew1P {
00029 public:
00031   PseudoNew1P (void *libFunPtr) {
00032     newMethodPtr = (T1 *(*)(T2)) libFunPtr;
00033   }
00035   PseudoNew1P (void) {
00036     newMethodPtr = (T1 *(*)(T2)) 0;
00037   }    
00038   virtual ~PseudoNew1P() {};
00042   void bind (void *libFunPtr) {
00043     newMethodPtr = (T1 *(*)(T2)) libFunPtr;
00044   }
00049   T1* create(T2 par) {
00050     return (*newMethodPtr)(par);
00051   }
00053   bool isValid () { return newMethodPtr != 0;}
00054 protected:
00055   T1* (*newMethodPtr) (T2);
00056 };
00057 
00058 
00059 #endif // _PSEUDONEW1P_H

Generated on Tue May 20 14:50:25 2003 for HepUtilities by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002