Project 1
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 
25 class Calendar
26 {
27  public:
28  Calendar();
29  Event &find( string query );
30  void print( ostream& out = cout ) const;
31  void read( string filename );
32  void read( istream& in );
33  unsigned size() const;
34  void synchronize( Calendar& calendar );
35  void write( string filename ) const;
36  void write( ostream& out = cout ) const;
37 
38  private:
40  vector<Event> events;
41 
42  void synchronize( vector<Event>& e1, vector<Event>& e2 );
43 
44 }; // Calendar class
45 
46 #endif
Definition: calendar.h:26
vector< Event > events
Definition: calendar.h:40
Definition: event.h:30