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

Last change on this file since 3473 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
Line 
1#ifndef GENERICFUNC_H
2#define GENERICFUNC_H
3
4#include "pexceptions.h"
5#include "classfunc.h"
6#include <vector>
7
8namespace SOPHYA {
9
10//! Abstract interface definition for functions viewed as classes
11 class GenericFunc : public ClassFunc {
12public:
13 GenericFunc(void) { }
14 virtual ~GenericFunc(void) { }
15
16 virtual double operator()(double x) {
17 cout<<"GenericFunc::operator(double) not implemented"<<endl;
18 throw NotAvailableOperation("GenericFunc::operator(double) not implemented");
19 }
20
21 virtual double operator()(double x,double y) {
22 cout<<"GenericFunc::operator(double,double) not implemented"<<endl;
23 throw NotAvailableOperation("GenericFunc::operator(double,double) not implemented");
24 }
25
26 virtual double operator()(double x,double y,double z) {
27 cout<<"GenericFunc::operator(double,double,double) not implemented"<<endl;
28 throw NotAvailableOperation("GenericFunc::operator(double,double,double) not implemented");
29 }
30
31 virtual double operator()(double* x) {
32 cout<<"GenericFunc::operator(double*) not implemented"<<endl;
33 throw NotAvailableOperation("GenericFunc::operator(double*) not implemented");
34 }
35
36 virtual double operator()(vector<double>& x) {
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.