Calendar Class Reference
#include <calendar.h>
List of all members.
Detailed Description
A class for storing events of a calendar that can be synchronized with other calendars. Methods exist to read and write events to and from files, which serve as proxies for sending and receiving between calendars on devices, on computers, and in the cloud.
- Author:
- Mark Maloof (maloof at cs georgetown edu)
- Version:
- 1.1, 11/28/12
Constructor & Destructor Documentation
Member Function Documentation
void Calendar::print |
( |
ostream & |
out = cout |
) |
|
Prints the events of this Calendar to the output stream in a format suitable for a user view, meaning that the events are printed in the external format and deleted events are excluded.
- Parameters:
-
| out | the output stream for printing |
bool Calendar::read |
( |
istream & |
in |
) |
throw ( invalid_argument ) |
Reads the events in the internal format from the input stream, and stores them in the vector events
. Returns true if the read operation is successful; returns false otherwise. Throws an exception if an argument's value is invalid.
- Parameters:
-
| in | the input stream name containing the events |
- Returns:
- the bool indicating whether the read operation is successful
- Exceptions:
-
| invalid_argument | if an argument's value is invalid |
bool Calendar::read |
( |
string |
filename |
) |
throw ( invalid_argument ) |
Reads the events in the internal format from the file named filename
, and stores them in the vector events
. Returns true if the read operation is successful; returns false otherwise. Throws an exception if an argument's value is invalid.
- Parameters:
-
| filename | the name of the file containing the events |
- Returns:
- the bool indicating if the read operation is successful
- Exceptions:
-
| invalid_argument | if an argument's value is invalid |
void Calendar::synchronize |
( |
vector< Event > & |
e1, |
|
|
vector< Event > & |
e2 | |
|
) |
| | [private] |
Synchronizes events e2
to e1
. For each event in e1
.
- Parameters:
-
| e1 | a vector of events |
| e2 | a vector of events |
void Calendar::synchronize |
( |
Calendar & |
calendar |
) |
|
void Calendar::write |
( |
ostream & |
out = cout |
) |
|
Writes the events of this Calendar to the output stream in the internal format.
- Parameters:
-
| out | the output stream for writing |
void Calendar::write |
( |
string |
filename |
) |
|
Writes the events of this Calendar to the file named filename
in the internal format.
- Parameters:
-
| filename | the name of the file for writing |
Member Data Documentation
the events of this calendar
The documentation for this class was generated from the following files: