calendar.h
Go to the documentation of this file.
1 #ifndef CALENDAR_H
2 #define CALENDAR_H
3 
4 #include <fstream>
5 #include <vector>
6 #include <string>
7 #include <stdexcept>
8 #include "event.h"
9 
10 using namespace std;
11 
24 class Calendar
25 {
26  public:
27  Calendar();
28  Event &find( string query ) throw ( logic_error );
29  void print( ostream& out = cout ) const;
30  void read( string filename ) throw ( logic_error, invalid_argument );
31  void read( istream& in ) throw ( invalid_argument );
32  unsigned size() const;
33  void synchronize( Calendar& e );
34  void write( string filename ) const;
35  void write( ostream& out = cout ) const;
36 
37  private:
39  vector<Event> events;
40 
41  void synchronize( vector<Event>& e1, vector<Event>& e2 );
42 
43 }; // Calendar class
44 
45 #endif
Definition: calendar.h:24
vector< Event > events
Definition: calendar.h:39
Definition: event.h:25