source: Sophya/trunk/SophyaLib/NTools/genericfunc.h@ 3718

Last change on this file since 3718 was 3409, checked in by cmv, 18 years ago

operator(double) de ClassFunc et GenericFunc n'est plus const , cmv 25/11/2007

File size: 1.4 KB
RevLine 
[3379]1#ifndef GENERICFUNC_H
2#define GENERICFUNC_H
3
4#include "pexceptions.h"
[3406]5#include "classfunc.h"
[3379]6#include <vector>
7
8namespace SOPHYA {
9
10//! Abstract interface definition for functions viewed as classes
[3409]11 class GenericFunc : public ClassFunc {
[3379]12public:
[3406]13 GenericFunc(void) { }
[3379]14 virtual ~GenericFunc(void) { }
15
[3409]16 virtual double operator()(double x) {
[3379]17 cout<<"GenericFunc::operator(double) not implemented"<<endl;
18 throw NotAvailableOperation("GenericFunc::operator(double) not implemented");
19 }
20
[3409]21 virtual double operator()(double x,double y) {
[3379]22 cout<<"GenericFunc::operator(double,double) not implemented"<<endl;
23 throw NotAvailableOperation("GenericFunc::operator(double,double) not implemented");
24 }
25
[3409]26 virtual double operator()(double x,double y,double z) {
[3379]27 cout<<"GenericFunc::operator(double,double,double) not implemented"<<endl;
28 throw NotAvailableOperation("GenericFunc::operator(double,double,double) not implemented");
29 }
30
[3409]31 virtual double operator()(double* x) {
[3379]32 cout<<"GenericFunc::operator(double*) not implemented"<<endl;
33 throw NotAvailableOperation("GenericFunc::operator(double*) not implemented");
34 }
35
[3409]36 virtual double operator()(vector<double>& x) {
[3379]37 cout<<"GenericFunc::operator(vector<double>&) not implemented"<<endl;
38 throw NotAvailableOperation("GenericFunc::operator(vector<double>&) not implemented");
39 }
40
41};
42
43} // Fin namespace SOPHYA
44
45#endif
Note: See TracBrowser for help on using the repository browser.