source: XIOS/trunk/src/functor.hpp @ 369

Last change on this file since 369 was 369, checked in by ymipsl, 12 years ago

Major Update

  • redesign Type and attribute manipulation
  • add enumerate type and attribute
  • use blitz class array instead of boost class array

YM

File size: 1.6 KB
Line 
1#ifndef __XMLIO_CFunctor__
2#define __XMLIO_CFunctor__
3
4/// xios headers ///
5#include "xmlioserver_spl.hpp"
6#include "exception.hpp"
7#include "array_new.hpp"
8
9namespace xios
10{
11   namespace func
12   {
13      /// ////////////////////// Déclarations ////////////////////// ///
14      class CFunctor : public CObject
15      {
16         /// Définition de type ///
17         typedef CObject SuperClass;
18
19         public :
20
21            /// Accesseurs ///
22            CArray<double,1> getDataOutput(void) const;
23            /// Opérateur ///
24            CArray<double,1> operator ()(const CArray<double,1>& dinput);
25
26            /// Destructeur ///
27            virtual ~CFunctor(void);
28
29            //Traitement ///
30            virtual void final(void);
31
32         protected :
33
34            /// Traitement ///
35            virtual void apply(const CArray<double,1>& dinput, CArray<double,1>& doutput) = 0;
36
37            /// Autres ///
38            virtual StdString toString(void) const;
39            virtual void fromString(const StdString & str);
40
41            /// Constructeurs ///
42            CFunctor(void);                             // Not implemented.
43            CFunctor(const StdString & id, CArray<double,1>& doutput);
44            CFunctor(const CFunctor & functor);         // Not implemented.
45            CFunctor(const CFunctor * const functor);   // Not implemented.
46
47         protected :
48            /// Propriétés privées ///
49            CArray<double,1>& doutput;
50            /// Propriétés protégées ///   
51            int nbcall;           
52      }; // class CFunctor
53   } // namespace func
54} // namespace xios
55
56//#include "functor_type.hpp"
57
58#endif // __XMLIO_CFunctor__
Note: See TracBrowser for help on using the repository browser.