Last change
on this file since 3368 was 3325, checked in by cmv, 18 years ago |
Mise en conformite / SOPHYA lib:
- on enleve #include "sopnamsp.h" dans les .cc de la librairie
- on encadre par "namespace SOPHYA { ... }" tout le code des .cc
de la librairie y compris les fonctions
- on met les fcts des .h dans le "namespace SOPHYA { ... }"
- on met #include "sopnamsp.h" dans tous les cmv*.cc cad les main programs
cmv le mauvais eleve (sur les conseils de Reza) 13/09/2007
|
File size:
1.3 KB
|
Line | |
---|
1 | #ifndef GENERICFUNC_H
|
---|
2 | #define GENERICFUNC_H
|
---|
3 |
|
---|
4 | #include "pexceptions.h"
|
---|
5 | #include <vector>
|
---|
6 |
|
---|
7 | namespace SOPHYA {
|
---|
8 |
|
---|
9 | //! Abstract interface definition for functions (double f(double)) viewed as classes
|
---|
10 | class GenericFunc {
|
---|
11 | public:
|
---|
12 | GenericFunc(void) { }
|
---|
13 | virtual ~GenericFunc(void) { }
|
---|
14 |
|
---|
15 | virtual double operator()(double x) {
|
---|
16 | cout<<"GenericFunc::operator(double) not implemented"<<endl;
|
---|
17 | throw NotAvailableOperation("GenericFunc::operator(double) not implemented");
|
---|
18 | }
|
---|
19 |
|
---|
20 | virtual double operator()(double x,double y) {
|
---|
21 | cout<<"GenericFunc::operator(double,double) not implemented"<<endl;
|
---|
22 | throw NotAvailableOperation("GenericFunc::operator(double,double) not implemented");
|
---|
23 | }
|
---|
24 |
|
---|
25 | virtual double operator()(double x,double y,double z) {
|
---|
26 | cout<<"GenericFunc::operator(double,double,double) not implemented"<<endl;
|
---|
27 | throw NotAvailableOperation("GenericFunc::operator(double,double,double) not implemented");
|
---|
28 | }
|
---|
29 |
|
---|
30 | virtual double operator()(double* x) {
|
---|
31 | cout<<"GenericFunc::operator(double*) not implemented"<<endl;
|
---|
32 | throw NotAvailableOperation("GenericFunc::operator(double*) not implemented");
|
---|
33 | }
|
---|
34 |
|
---|
35 | virtual double operator()(vector<double>& x) {
|
---|
36 | cout<<"GenericFunc::operator(vector<double>&) not implemented"<<endl;
|
---|
37 | throw NotAvailableOperation("GenericFunc::operator(vector<double>&) not implemented");
|
---|
38 | }
|
---|
39 |
|
---|
40 | };
|
---|
41 |
|
---|
42 | } // Fin namespace SOPHYA
|
---|
43 |
|
---|
44 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.