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