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