00001 #ifndef EVENT_H 00002 #define EVENT_H 00003 00004 #include <iostream> 00005 #include <string> 00006 #include <stdexcept> 00007 #include "datetime.h" 00008 00024 class Event 00025 { 00026 00027 friend ostream& operator<<( ostream& out, const Event& e ); 00028 friend istream& operator>>( istream& in, Event& e ) throw ( invalid_argument ); 00029 00030 public: 00031 Event(); 00032 void setStatus( char status ) throw ( invalid_argument ); 00033 char getStatus() 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 00040 private: 00042 char status; 00044 string id; 00046 string name; 00048 string location; 00050 DateTime start; 00052 DateTime end; 00054 DateTime modified; 00055 00056 string readDoubleQuotedString( istream& in ) const; 00057 00058 }; // Event class 00059 00060 #endif 00061