source: XIOS/branchs/xios-1.0/src/duration.hpp @ 798

Last change on this file since 798 was 612, checked in by rlacroix, 9 years ago

Improve CF compliance: Write the "cell_methods" metadata.

Also try to use the time units defined by the UDUnits specification.

  • 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.6 KB
RevLine 
[219]1#ifndef __XMLIO_CDuration__
2#define __XMLIO_CDuration__
3
[335]4/// xios headers ///
[219]5#include "xmlioserver_spl.hpp"
6#include "exception.hpp"
7
[335]8namespace xios
[219]9{
10      /// ////////////////////// Déclarations ////////////////////// ///
11      typedef long long int Time;
12      class CCalendar;
13
14      ///---------------------------------------------------------------
15      typedef struct _duration
16      {
17         public :
18
19            /// Opérateurs ///
20            struct _duration & operator=(const struct _duration& duration);
21
22            friend StdOStream & operator<<(StdOStream & out, const struct _duration& duration);
23            friend StdIStream & operator>>(StdIStream & in , struct _duration& duration);
24
25            /// Test ///
26            bool isNone(void) const;
27
28            /// Traitement ///
29            struct _duration & resolve(const CCalendar & calendar);
[436]30            struct _duration & solveTimeStep(const CCalendar & c) ;
[219]31            /// Autres ///
32            StdString toString(void) const;
[612]33            StdString toStringUDUnits(void) const;
[219]34
35         public: /* static */
36
37            static struct _duration FromString(const StdString & str);
38
39            /// Propriétés publiques ///
[424]40            double year, month, day, hour, minute, second, timestep;
[219]41
42      } CDuration;
43
44      ///---------------------------------------------------------------
45
46      const extern CDuration Year, Month , Week  , Day    ,
[424]47                             Hour, Minute, Second, NoneDu, TimeStep ;
[219]48      ///---------------------------------------------------------------
49
[335]50} // namespace xios
[219]51
52#endif // __XMLIO_CDuration__
Note: See TracBrowser for help on using the repository browser.