Project 1
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 
9 using namespace std;
10 
29 class Event
30 {
31 
32  friend ostream& operator<<( ostream& out, const Event& e );
33  friend istream& operator>>( istream& in, Event& e );
34 
35  public:
36  Event();
37  string getName() const;
38  string getLocation() const;
39  char getStatus() const;
40  bool matchNameOrLocation( const string& query ) const;
41  bool operator==( const Event& e ) const;
42  bool operator!=( const Event& e ) const;
43  bool operator<( const Event& e ) const;
44  bool operator>( const Event& e ) const;
45  void print( ostream& out = cout ) const;
46  void setStatus( char status ); // throw ( invalid_argument );
47 
48  private:
50  char status;
52  string id;
54  string name;
56  string location;
63 
64  string readDoubleQuotedString( istream& in ) const;
65 
66 }; // Event class
67 
68 #endif
69 
Definition: datetime.h:20
Definition: event.h:30
string location
Definition: event.h:56
string name
Definition: event.h:54
string id
Definition: event.h:52
DateTime modified
Definition: event.h:62
char status
Definition: event.h:50
DateTime start
Definition: event.h:58
DateTime end
Definition: event.h:60
istream & operator>>(istream &in, DateTime &dt)
Definition: datetime.cc:235
ostream & operator<<(ostream &out, const DateTime &dt)
Definition: datetime.cc:207