source: XIOS/trunk/src/calendar_util.hpp @ 1211

Last change on this file since 1211 was 643, checked in by rlacroix, 9 years ago

Use the filter infrastructure to handle the temporal operations.

Add a temporal filter to do so.

  • 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.7 KB
RevLine 
[591]1#ifndef __XIOS_CCalendar_util__
2#define __XIOS_CCalendar_util__
[219]3
[591]4/// XIOS headers ///
5#include "xios_spl.hpp"
[219]6#include "exception.hpp"
7#include "calendar.hpp"
8
[335]9namespace xios
[219]10{
11      /// ////////////////////// Déclarations ////////////////////// ///
12
[549]13      CDuration operator*(const double& scal,   const CDuration& ddr);
14      CDuration operator-(const CDuration& ddr, const CDuration& dr);
15      CDuration operator+(const CDuration& ddr, const CDuration& dr);
16      CDuration operator*(const CDuration& ddr, const double& scal);
17      CDuration operator-(const CDuration& ddr);
[219]18
[549]19      CDate operator+(const CDate& dt, const CDuration& dr); // Non testée.
20      CDate operator-(const CDate& dt, const CDuration& dr);
[219]21
[549]22      CDuration operator-(const CDate& dt0, const CDate& dt1);
[219]23
24      /// Les opérateurs de comparaison. (Non testés pour le moment)
[545]25      bool operator==(const CDuration& ddr, const CDuration& dr);
26      bool operator!=(const CDuration& ddr, const CDuration& dr);
27
[219]28      bool operator==(const CDate& dt0, const CDate& dt1);
29      bool operator< (const CDate& dt0, const CDate& dt1);
30
[549]31      bool operator!=(const CDate& dt0, const CDate& dt1);
32      bool operator> (const CDate& dt0, const CDate& dt1);
33      bool operator>=(const CDate& dt0, const CDate& dt1);
34      bool operator<=(const CDate& dt0, const CDate& dt1);
[219]35
36      ///---------------------------------------------------------------
37
[643]38      //!< Provides a fake "less" comparator for durations that can be used as a comparator for maps
39      struct DurationFakeLessComparator {
40        bool operator()(const CDuration& dur1, const CDuration& dur2) const;
41      };
[335]42} // namespace xios
[219]43
[591]44#endif //__XIOS_CCalendar_util__
Note: See TracBrowser for help on using the repository browser.