Changeset 119 for XMLIO_V2/dev/dev_rv/src/XMLIO/date.hpp
- Timestamp:
- 07/20/10 16:20:13 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XMLIO_V2/dev/dev_rv/src/XMLIO/date.hpp
r118 r119 8 8 public : 9 9 10 Date(const AbstractCalendar& cal, int yr = 0, int mth = 0, int d = 0, int hr = 0, int min = 0 , int sec = 0) : relCalendar(cal)10 Date(const AbstractCalendar& cal, int yr = 0, int mth = 1, int d = 1, int hr = 0, int min = 0 , int sec = 0) : relCalendar(cal) 11 11 , year(yr), month(mth), day(d), hour(hr), minute(min), second(sec) 12 {/* Ne rien faire de plus */} 12 { 13 if(!checkDate()) 14 WARNING("La date initialisée a été modifiée car elle était incorrecte par rapport au calendrier souhaité."); 15 } 13 16 14 17 Date(const Date& d) : relCalendar(d.relCalendar) 15 18 , year(d.year), month(d.month), day(d.day), hour(d.hour), minute(d.minute), second(d.second) 16 {/* Ne rien faire de plus */} 19 { 20 if(!checkDate()) 21 WARNING("La date initialisée a été modifiée car elle était incorrecte par rapport au calendrier souhaité."); 22 } 17 23 18 24 operator Time(void); // Retourne le nombre de secondes écoulées depuis la date initiale définie dans le calendrier. 25 bool checkDate(void); // Vérifie la validité de la date. 19 26 20 27 friend std::ostream& operator<<(std::ostream& out, const Date& d) … … 30 37 in >> d.day >> c >> d.month >> c >> d.year >> c; 31 38 in >> d.hour >> c >> d.minute >> c >> d.second; 39 if(!d.checkDate()) 40 WARNING("La date initialisée (depuis une chaîne de caractÚres) a été modifiée car elle était incorrecte par rapport au calendrier souhaité."); 32 41 return (in); 33 42 }
Note: See TracChangeset
for help on using the changeset viewer.