00001 #ifndef CALENDAR_H
00002 #define CALENDAR_H
00003
00004 #include <fstream>
00005 #include <vector>
00006 #include <string>
00007 #include <stdexcept>
00008 #include "event.h"
00009
00010 using namespace std;
00011
00022 class Calendar
00023 {
00024 public:
00025 Calendar();
00026 bool read( string filename ) throw ( invalid_argument );
00027 bool read( istream& in ) throw ( invalid_argument );
00028 void write( string filename );
00029 void write( ostream& out = cout );
00030 void print( ostream& out = cout );
00031 void synchronize( Calendar& e );
00032
00033 private:
00035 vector<Event> events;
00036
00037 void synchronize( vector<Event>& e1, vector<Event>& e2 );
00038
00039 };
00040
00041 #endif