[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] | 9 | namespace 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 | |
---|
[1920] | 19 | bool operator>(const CDuration& ddr, const CDuration& dr); |
---|
| 20 | bool operator<(const CDuration& ddr, const CDuration& dr); |
---|
| 21 | |
---|
[549] | 22 | CDate operator+(const CDate& dt, const CDuration& dr); // Non testée. |
---|
| 23 | CDate operator-(const CDate& dt, const CDuration& dr); |
---|
[219] | 24 | |
---|
[549] | 25 | CDuration operator-(const CDate& dt0, const CDate& dt1); |
---|
[219] | 26 | |
---|
| 27 | /// Les opérateurs de comparaison. (Non testés pour le moment) |
---|
[545] | 28 | bool operator==(const CDuration& ddr, const CDuration& dr); |
---|
| 29 | bool operator!=(const CDuration& ddr, const CDuration& dr); |
---|
| 30 | |
---|
[219] | 31 | bool operator==(const CDate& dt0, const CDate& dt1); |
---|
| 32 | bool operator< (const CDate& dt0, const CDate& dt1); |
---|
| 33 | |
---|
[549] | 34 | bool operator!=(const CDate& dt0, const CDate& dt1); |
---|
| 35 | bool operator> (const CDate& dt0, const CDate& dt1); |
---|
| 36 | bool operator>=(const CDate& dt0, const CDate& dt1); |
---|
| 37 | bool operator<=(const CDate& dt0, const CDate& dt1); |
---|
[219] | 38 | |
---|
| 39 | ///--------------------------------------------------------------- |
---|
| 40 | |
---|
[643] | 41 | //!< Provides a fake "less" comparator for durations that can be used as a comparator for maps |
---|
| 42 | struct DurationFakeLessComparator { |
---|
| 43 | bool operator()(const CDuration& dur1, const CDuration& dur2) const; |
---|
| 44 | }; |
---|
[335] | 45 | } // namespace xios |
---|
[219] | 46 | |
---|
[591] | 47 | #endif //__XIOS_CCalendar_util__ |
---|