Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

Event Class Reference

#include <Event.H>

List of all members.

Public Types

typedef enum Event::EventCategory EventCategory
 Standard list of our Event Categories.
enum  EventCategory {
  CONCERT, PERFORMANCE, SPORTS, COMEDY,
  MUSEUM, OTHER_UNKNOWN
}
 Standard list of our Event Categories. More...

Public Member Functions

 Event ()
 Standard constructor; Null-terminates all strings, sets all "known"s to false, and all coordinates/times to "Unknown" constants.
 Event (const Event &otherEvent)
 Copy Constructor. Copies all member variables, with a deep copy of categories.
 ~Event ()
 Destuctor; clears Category list.
int operator== (const Event &param)
 Equality test.
bool isRealEvent ()
 Check if this is a real Event, or just a dummy one.
char * getEventTitle ()
 Get the title of this Event.
char * getLocationTitle ()
 Get the location of this Event in char* form, such as "Dunkin' Donuts Center".
char * getStreet ()
 Get the Street address of this Event, such as "1 Sabin Street".
char * getState ()
 Get the postal code of the state of this Event, such as "RI".
char * getCity ()
 Get the city of this Event, such as "Providence".
char * getZip ()
 Get the ZIP code of this Event, such as 02903-9000.
double getLatitude ()
 Get the Latitude of this Event, or EVENT_COORDINATE_UNKNOWN if it is unknown.
double getLongitude ()
 Get the Longitude of this Event, or EVENT_COORDINATE_UNKNOWN if it is unknown.
time_t getStartTime ()
 Get the starting time of this Event, or EVENT_TIME_UNKNOWN if it is unknown.
bool isTimeSpecified ()
 Returns true if the time of day is specified, false otherwise. DEPRECATED.
time_t getEndTime ()
 Get the ending time of this Event, or EVENT_TIME_UNKNOWN if it is unknown.
list< EventCategorygetCategories ()
 Get the list of all catogories for this event. DEPRECATED.
list< EventCategorygetCategories_c () const
char * getUrl ()
 Get the URL from which we found this Event.
char * getDescription ()
 Get a description of this Event.
bool setEventTitle (char *title)
 Sets the title of this Event.
bool setLocationTitle (char *location)
 Sets the location of this Event.
bool setStreet (char *street)
 Sets the street of this Event.
bool setState (char *state)
 Sets the state of this Event.
bool setCity (char *city)
 Sets the city of this Event.
bool setZip (char *zip)
 Sets the zip of this Event.
bool setLatitude (double latitude)
 Sets the latitude of this Event.
bool setLongitude (double longitude)
 Sets the longitude of this Event.
bool setStartTime (time_t startTime)
 Sets the start time of this Event, and sets starttime_Known to true.
void setTimeSpecified (bool timeSpecified)
 Sets whether or not the time of day for this Event was specified.
bool setEndTime (time_t endTime)
 Sets the end time of this Event, and sets endtime_Known to true.
void setStartTimeSpecified (bool isSpecified)
 Sets whether or not the start time of this Event was specified.
void setEndTimeSpecified (bool isSpecified)
 Sets whether or not the end time of this Event was specified.
bool isStartTimeSpecified ()
 Checks if the start time of day is specified.
bool isEndTimeSpecified ()
 Checks if the end time of day is specified.
bool addCategory (EventCategory cat)
bool setUrl (char *url)
 Sets the reference URL of this Event.
bool setDescription (char *description)
 Sets the description of this Event.
void mergeEvent (const Event &otherEvent)
 Not used and not written.
void printEvent ()
 Prints the contents of this event to stdout.


Detailed Description

Class representing an Event to be found by Parsers, stored by the Database, and displayed by the GUI. Serves primarily as a storage class, with getters and setters. Minimum other functionality.


Member Enumeration Documentation

enum Event::EventCategory
 

Standard list of our Event Categories.

Enumeration values:
CONCERT  A concert.
PERFORMANCE  A play, musical, dance recital, etc.
SPORTS  A sports event, such as a baseball game, or open athletic activity, such as public skating.
COMEDY  Comedic happenings, such as a stand-up comedy show.
MUSEUM  A museum, or some artistic / cultural display not in any other category.
OTHER_UNKNOWN  Event category either unrecognized, or was not given and not able to be deduced.


Member Function Documentation

bool Event::addCategory EventCategory  cat  ) 
 

Adds a category to this Event's category list. Will not insert duplicate categories.

Parameters:
cat The category to add.
Returns:
true if the add succeeded, false otherwise (most likely due to a duplicate category)

list< Event::EventCategory > Event::getCategories  ) 
 

Get the list of all catogories for this event. DEPRECATED.

Returns:
An STL list of Categories for this Event.
Deprecated:
use getCategories_c() instead, which is a const method.

list< Event::EventCategory > Event::getCategories_c  )  const
 

Get the list of all categories for this event.

Returns:
An STL list of Categories for this Event.

char * Event::getCity  ) 
 

Get the city of this Event, such as "Providence".

Returns:
A char* indicating the Event's City

char * Event::getDescription  ) 
 

Get a description of this Event.

Returns:
A char* indicating the Event's description.

time_t Event::getEndTime  ) 
 

Get the ending time of this Event, or EVENT_TIME_UNKNOWN if it is unknown.

Returns:
A time_t, indicating the Event's end time, or EVENT_TIME_UNKNOWN if none has been set.

char * Event::getEventTitle  ) 
 

Get the title of this Event.

Returns:
a char* indicating the Event title.

double Event::getLatitude  ) 
 

Get the Latitude of this Event, or EVENT_COORDINATE_UNKNOWN if it is unknown.

Returns:
A double, indicating the Event's latitude, in the (-90, 90) range. Will return EVENT_COORDINATE_UNKNOWN if no latitude has been set.

char * Event::getLocationTitle  ) 
 

Get the location of this Event in char* form, such as "Dunkin' Donuts Center".

Returns:
A char* indicating the Event Location's Title

double Event::getLongitude  ) 
 

Get the Longitude of this Event, or EVENT_COORDINATE_UNKNOWN if it is unknown.

Returns:
A double, indicating the Event's longitude, in the (-180, 180) range. Will return EVENT_COORDINATE_UNKNOWN if no longitude has been set.

time_t Event::getStartTime  ) 
 

Get the starting time of this Event, or EVENT_TIME_UNKNOWN if it is unknown.

Returns:
A time_t, indicating the Event's start time, or EVENT_TIME_UNKNOWN if none has been set.

char * Event::getState  ) 
 

Get the postal code of the state of this Event, such as "RI".

Returns:
A char* indicating the Event's State

char * Event::getStreet  ) 
 

Get the Street address of this Event, such as "1 Sabin Street".

Returns:
A char* indicating the Event Street address

char * Event::getUrl  ) 
 

Get the URL from which we found this Event.

Returns:
A char* indicating the Event's source URL (for user verification)

char * Event::getZip  ) 
 

Get the ZIP code of this Event, such as 02903-9000.

Returns:
A char* indicating the Event's Zip code

bool Event::isEndTimeSpecified  ) 
 

Checks if the end time of day is specified.

Do NOT confuse *specified* with *known*. If we are given a date, but no time of day, then it is known, but not specified. Getter functions will return EVENT_TIME_UNKNOWN if the time is not known, and will return midnight on the start of the specified day if they are known but not specified.

Returns:
true if end time has been explicitly specified, false otherwise.

bool Event::isRealEvent  ) 
 

Check if this is a real Event, or just a dummy one.

Determines if this is a "Real" event, or an empty one. If length of Title, Location, or Street is high enough, event is considered real.

Returns:
true if this is a real event, false otherwise.

bool Event::isStartTimeSpecified  ) 
 

Checks if the start time of day is specified.

Do NOT confuse *specified* with *known*. If we are given a date, but no time of day, then it is known, but not specified. Getter functions will return EVENT_TIME_UNKNOWN if the time is not known, and will return midnight on the start of the specified day if they are known but not specified.

Returns:
true if start time has been explicitly specified, false otherwise.

bool Event::isTimeSpecified  ) 
 

Returns true if the time of day is specified, false otherwise. DEPRECATED.

Returns:
true if start time has been specified, false otherwise.
Deprecated:
Use isStartTimeSpecified or isEndTimeSpecified instead.

void Event::mergeEvent const Event otherEvent  ) 
 

Not used and not written.

In theory, would combine Events from multiple sources, reconciling partial information.

Parameters:
otherEvent Not used.

int Event::operator== const Event param  ) 
 

Equality test.

Returns false if events are equal, true otherwise. Equality requires that Title, Street, Zip, and Location match _exactly) (including case), and also that, IF both This and param have known startTimes, that they also match. Apparently, the DB has a more intelligent means of Event comparisons.

Parameters:
param Event to compare to this.
Returns:
True if this Event matches param sufficiently, false otherwise.

bool Event::setCity char *  city  ) 
 

Sets the city of this Event.

Parameters:
city The new Event city
Returns:
true if set was successful, false otherwise.

bool Event::setDescription char *  description  ) 
 

Sets the description of this Event.

Parameters:
description The new Event description
Returns:
true if set was successful, false otherwise.

bool Event::setEndTime time_t  endTime  ) 
 

Sets the end time of this Event, and sets endtime_Known to true.

Parameters:
endTime The new Event end time, as a time_t
Returns:
true if set was successful, false otherwise.

void Event::setEndTimeSpecified bool  isSpecified  ) 
 

Sets whether or not the end time of this Event was specified.

Parameters:
isSpecified true if we know the starting time of day, false otherwise

bool Event::setEventTitle char *  title  ) 
 

Sets the title of this Event.

Parameters:
title The new Event Location
Returns:
true if set was successful, false otherwise.

bool Event::setLatitude double  latitude  ) 
 

Sets the latitude of this Event.

Parameters:
latitude The new Event latitude
Returns:
true if set was successful, false otherwise.

bool Event::setLocationTitle char *  location  ) 
 

Sets the location of this Event.

Parameters:
location The new Event Location
Returns:
true if set was successful, false otherwise.

bool Event::setLongitude double  longitude  ) 
 

Sets the longitude of this Event.

Parameters:
longitude The new Event longitude
Returns:
true if set was successful, false otherwise.

bool Event::setStartTime time_t  startTime  ) 
 

Sets the start time of this Event, and sets starttime_Known to true.

Parameters:
startTime The new Event start time, as a time_t
Returns:
true if set was successful, false otherwise.

void Event::setStartTimeSpecified bool  isSpecified  ) 
 

Sets whether or not the start time of this Event was specified.

Parameters:
isSpecified true if we know the starting time of day, false otherwise

bool Event::setState char *  state  ) 
 

Sets the state of this Event.

Parameters:
state The new Event State
Returns:
true if set was successful, false otherwise.

bool Event::setStreet char *  street  ) 
 

Sets the street of this Event.

Parameters:
street The new Event Street
Returns:
true if set was successful, false otherwise.

void Event::setTimeSpecified bool  timeSpecified  ) 
 

Sets whether or not the time of day for this Event was specified.

Parameters:
timeSpecified true if the time of day is specified, false otherwise.
Returns:
true if set was successful, false otherwise.
Deprecated:
. Use setStartTimeSpecified(bool) and setEndTimeSpecified(bool) instead.

bool Event::setUrl char *  url  ) 
 

Sets the reference URL of this Event.

Parameters:
url The new Event reference URL
Returns:
true if set was successful, false otherwise.

bool Event::setZip char *  zip  ) 
 

Sets the zip of this Event.

Parameters:
zip The new Event zip
Returns:
true if set was successful, false otherwise.


The documentation for this class was generated from the following files:
Generated on Wed May 17 22:28:21 2006 for GeoEvents by  doxygen 1.4.2