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

Last change on this file since 501 was 501, checked in by ymipsl, 9 years ago

Add licence copyright to all file ond directory src using the command :
svn propset -R copyright -F header_licence src

XIOS is now officialy under CeCILL licence

YM

  • Property copyright set to
    Software name : XIOS (Xml I/O Server)
    http://forge.ipsl.jussieu.fr/ioserver
    Creation date : January 2009
    Licence : CeCCIL version2
    see license file in root directory : Licence_CeCILL_V2-en.txt
    or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
    Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement)
    CNRS/IPSL (Institut Pierre Simon Laplace)
    Project Manager : Yann Meurdesoif
    yann.meurdesoif@cea.fr
File size: 1.9 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         public :
19         enum ETimeType { once, instant, centered } ;
20
21            /// Accesseurs ///
22            CArray<double,1> getDataOutput(void) const;
23            /// Opérateur ///
24            CArray<double,1> operator ()(const CArray<double,1>& dinput);
25            virtual ETimeType timeType(void) = 0 ;
26
27            /// Destructeur ///
28            virtual ~CFunctor(void);
29
30            //Traitement ///
31            virtual void final(void);
32
33         protected :
34
35            /// Traitement ///
36            virtual void apply(const CArray<double,1>& dinput, CArray<double,1>& doutput) = 0;
37
38            /// Autres ///
39            virtual StdString toString(void) const;
40            virtual void fromString(const StdString & str);
41
42            /// Constructeurs ///
43            CFunctor(void);                             // Not implemented.
44            CFunctor(const StdString & id, CArray<double,1>& doutput);
45            CFunctor(const StdString & id, CArray<double,1>& doutput, double missingValue);
46           CFunctor(const CFunctor & functor);         // Not implemented.
47            CFunctor(const CFunctor * const functor);   // Not implemented.
48         protected :
49            /// Propriétés privées ///
50            CArray<double,1>& doutput;
51            /// Propriétés protégées ///   
52            int nbcall;           
53            bool hasMissingValue ;
54            double missingValue ;
55            CArray<int,1> nbcalls ;
56      }; // class CFunctor
57   } // namespace func
58} // namespace xios
59
60//#include "functor_type.hpp"
61
62#endif // __XMLIO_CFunctor__
Note: See TracBrowser for help on using the repository browser.