00001 #ifndef EVENT_H 00002 #define EVENT_H 00003 00004 #include <sstream> 00005 #include "datetime.h" 00006 00022 class Event 00023 { 00024 00025 friend ostream &operator<<( ostream &out, const Event &e ); 00026 friend istream &operator>>( istream &in, Event &e ); 00027 00028 public: 00029 Event(); 00030 void setStatus( char status ); 00031 char getStatus() const; 00032 void read( istream &in ); 00033 void writeln( ostream &out ) const; 00034 void println( ostream &out = cout ) const; 00035 bool operator==( const Event &e ) const; 00036 bool operator!=( const Event &e ) const; 00037 bool operator<( const Event &e ) const; 00038 bool operator>( const Event &e ) const; 00039 string toString() const; 00040 00041 private: 00043 char status; 00045 string id; 00047 string name; 00049 string location; 00051 DateTime start; 00053 DateTime end; 00055 DateTime modified; 00056 00057 string readDoubleQuotedString( istream &in ) const; 00058 00059 }; // Event class 00060 00061 #endif 00062