event.h
Go to the documentation of this file.
1 #ifndef EVENT_H
2 #define EVENT_H
3 
4 #include <iostream>
5 #include <string>
6 #include <stdexcept>
7 #include "datetime.h"
8 
25 class Event
26 {
27 
28  friend ostream& operator<<( ostream& out, const Event& e );
29  friend istream& operator>>( istream& in, Event& e ) throw ( invalid_argument );
30 
31  public:
32  Event();
33  string getName() const;
34  string getLocation() const;
35  char getStatus() const;
36  bool operator==( const Event& e ) const;
37  bool operator!=( const Event& e ) const;
38  bool operator<( const Event& e ) const;
39  bool operator>( const Event& e ) const;
40  bool operator==( const string& query ) const;
41  void println( ostream& out = cout ) const;
42  void setStatus( char status ) throw ( invalid_argument );
43 
44  private:
46  char status;
48  string id;
50  string name;
52  string location;
59 
60  string readDoubleQuotedString( istream& in ) const;
61 
62 }; // Event class
63 
64 #endif
65 
char getStatus() const
Definition: event.cc:41
Definition: datetime.h:18
DateTime modified
Definition: event.h:58
void setStatus(char status)
Definition: event.cc:166
bool operator>(const Event &e) const
Definition: event.cc:95
bool operator!=(const Event &e) const
Definition: event.cc:67
bool operator<(const Event &e) const
Definition: event.cc:81
friend ostream & operator<<(ostream &out, const Event &e)
Definition: event.cc:182
void println(ostream &out=cout) const
Definition: event.cc:122
char status
Definition: event.h:46
string getLocation() const
Definition: event.cc:19
bool operator==(const Event &e) const
Definition: event.cc:54
DateTime start
Definition: event.h:54
string location
Definition: event.h:52
friend istream & operator>>(istream &in, Event &e)
Definition: event.cc:207
string id
Definition: event.h:48
Event()
Definition: event.cc:8
string name
Definition: event.h:50
Definition: event.h:25
string readDoubleQuotedString(istream &in) const
Definition: event.cc:139
DateTime end
Definition: event.h:56
string getName() const
Definition: event.cc:30