Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members

plExternalProbMethod.h

00001 /*=============================================================================
00002  * Product        : OpenPL 
00003  * File           : plExternalProbMethod.h
00004  * Author         : Kamel Mekhnacha
00005  * Creation       : Tue Apr  9 11:28:58 2002
00006  *
00007  *=============================================================================
00008  *     (c) Copyright 2000, Centre National de la Recherche Scientifique,
00009  *                              all rights reserved
00010  *=============================================================================
00011  *
00012  *------------------------- Description ---------------------------------------
00013  *   
00014  *   
00015  *-----------------------------------------------------------------------------
00016 */
00017 
00018 
00019 #ifndef _plExternalProbMethod_h_
00020 #define _plExternalProbMethod_h_
00021 
00022 #include <plVariablesConjunction.h>
00023 #include <plValues.h>
00024 #include <plExternProbFuncAtKernel.h>
00025 
00026 
00027 
00028 // A formal Function is a function used to define a Dirac Function */
00029 template<class T>
00030 class  kplExternalProbMethod : public  kplExternalProbFunction
00031 {
00032 private:
00033   
00034   /* Pointer to the object on which the method is called */
00035   T *user_object;
00036   
00038   plProbValue (T::*user_method)(const plValues &input);
00039 
00040   
00041 public:
00042   kplExternalProbMethod(){};
00043   kplExternalProbMethod(const list <kplVariable*>& vars,
00044             T *obj,
00045             plProbValue (T::*method)(const plValues &input),
00046             const string& func_name)
00047     :kplExternalProbFunction(vars, func_name),
00048      user_object(obj), user_method(method)
00049   {}
00050   
00051  
00052 
00053   virtual ~kplExternalProbMethod(){};
00054 
00055 #ifdef PL_PARA_WITH_NEWF
00056   plProbValue operator()(const plDataValues& values) const 
00057   {
00058     plValues input_values_copy(*input_values, (plDataValues*)&values);
00059     return (user_object->*user_method)(input_values_copy);
00060   }
00061 #else
00062   plProbValue operator()(const plValues& values) const 
00063   {
00064     return (user_object->*user_method)(values);
00065   }
00066 #endif
00067  
00068 };
00069 
00070 
00071 
00072 #endif

Generated on Fri Apr 1 10:58:13 2005 for ProBT by  doxygen 1.4.1