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

ParserTurnToTen.C File Reference

#include "ParserTurnToTen.H"
#include <stdlib.h>
#include <string>
#include <iostream>
#include <errno.h>
#include "HTMLGrabber.H"
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

Functions

list< EventduplicateEvent (Event evt, struct tm firstDay, struct tm lastDay)
 Returns a list containing duplicates of the given Event, one for each of the day range given.
bool tttFindNextPage ()
 Sets the next URL, w/ the next set of Events, based on the current URL.
bool tttIsEmptyFile (char *fileName)
 Determines if a given file is empty (most likely due to wget failure).
list< EventtttFindEvents (FILE *page)
 Finds the 10 Event listings on a given subpage.
void grabTimeFromLine (char *str, Event *evt)
 Sets the time of an Event.
void grabLocationFromLine (char *str, Event *evt)
 Sets the location of an Event.

Variables

char * starting_Url = "http://www.pwcvb.com/visitors/members/view-events.cfm?StartRow=01"
 URL from which parsing begins.
char ttt_Next_Page [PARSERTTT_STARTINGURL_LENGTH+1]
 Next page to Parse.
FILE * ttt_page
 File descriptor for the currently-parsed page.
HTMLGrabber ttt_myGrabber
 Grabber of ye olde HTML.

Detailed Description

Author:
Andrew Simon
Date:
05-02-06

Function Documentation

list< Event > duplicateEvent Event  evt,
struct tm  firstDay,
struct tm  lastDay
 

Returns a list containing duplicates of the given Event, one for each of the day range given.

Also sets the times accordingly. Cannot handle start times or end times that vary by day.

Parameters:
evt Event to duplicate
firstDay first day of the Event
lastDay last day of the Event
Returns:
List of Events matching this one exactly, with start and end times in the range firstDay to lastDay.

void grabLocationFromLine char *  str,
Event evt
 

Sets the location of an Event.

Parameters:
str The line of HTML containing this information.
evt The Event. Location, Street, Zip, and City may be changed by this function.

void grabTimeFromLine char *  str,
Event evt
 

Sets the time of an Event.

Parameters:
str The line of HTML containing this information.
evt The Event. Start Time and possibly End Time will be modified by this function.

list< Event > tttFindEvents FILE *  page  ) 
 

Finds the 10 Event listings on a given subpage.

Parameters:
page The opened file reader for the HTML of the page to parse.
Returns:
List of Events found on this page.

bool tttFindNextPage  ) 
 

Sets the next URL, w/ the next set of Events, based on the current URL.

Returns:
true if all goes well, false otherwise.

bool tttIsEmptyFile char *  fileName  ) 
 

Determines if a given file is empty (most likely due to wget failure).

Parameters:
fileName to consider.
Returns:
true if file is empty, false otherwise.


Generated on Wed May 17 22:28:20 2006 for GeoEvents by  doxygen 1.4.2