Please see comments for precise description of how things work/interact.
Classes Used (alphabetically):
Appointment.h : one of the most useful.
Within it contained day and time classes. Doesn't really "do" much
but serves as an important container class to hold all information
together. (day, time, descrip)
Day.h: overloaded the < operator in order
to have monday be "less than" tuesday, and tuesday < wednesday
saturday is the highest value. forced to also overload the <<
operator for ostreams the member functions, like the
appointment class don't really do much, but provide different ways
of accessing day, and getting the appropriate name.
HtmlCreator.h: does a lot of work with its member
functions. the end result is an html document which creates an appropriate
schedule. gets passed the vector of appointments , and an ofstream
to write into. would've have liked to divide into more classes, and
cut down on the number of private vars , but will probably wait until version
2.0 to do so. specifically a color class was considered, but you'd have
to overload the [] operator. in addition an additional functional
feature not included in this class is that of a size class that could (similar
to the proposed color class) help to edit the html table according to the
user's preferences. the vector myTimes, and myDays simply aid in
constructing the table. To make the table, a series of makeXX are
called to deal with the html tags. the main work of iterating through
the cells takes place in two for loops, with the outer incrementing the
times (row value), and the inner incrementing the days (cols value).
day was chosen to be an integer (as opposed to a string) in order to capitizize
on the ability to increment ints , and not have to overload the ++ operator,
and also because the day class had member functions to aid in doing this.
the default colors were selected randomly, there was no system to it at
all. i do feel they look pretty good. if one had multiple appointments,
it'd be easy to increaase the # of colors by adjusting myColors in the
constructor, as well as adding to the defaultColors() member function.
Conflict doesn't work correctly, but will be fixed before the next version
comes out. Currently, the "conflicting "appointment (the 2nd
one by virtue of being second receives that title!) is set aside at the
correct time, on the far right of the table, where things are not actually
defined yet.
Reader.h: this abstract base class is the basis for wagreader and yawlreader.h All of their functions are listed in this class. the next version will likely have the private vars myApps and such also in this class so as to inherit even more.
Readerfactory.h: its private constructor ensures only one copy of it will be made at a time. the make Reader public function is able to return a pointer to a reader (which as aforementioned becomes either a wagreader or yawlreader) via the clone mechanism in reader.h. the private vector myReaders stores different supportable hyperwag types, and simply would have to be appended to if functionality was needed to be increased.
Time.h: Similar to day.h it doesn't really "do "
much, but holds its own my being able to return a more managable form of
the original parsed string. if the hyperwag extentions (wagalang,
and yawl) managed to have time be read in
as an int, the justification for this class would be harder.
Wagreader.h: a derivative of reader.h, wag chooses to store its input appointments via a vector of pointer to appointments. pointers were used to cut down on memory usage. most of the member functions are self -explanatory.
Yawlreader.h: see comments for Wagreader.h
Potential Classes not Implemented, but Thought About
Sorting.h: this class would've
sorted the vector by days, and then sort within the days by time.
we couldn't figure out if this would've helped ultimatley in htmlcreate
class or simply be a waste. we ultimately decided against this class.