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

Weather Class Reference

#include <Weather.H>

List of all members.

Public Member Functions

bool getWeather (char *zip, time_t time, char *weatherLink, char *pictureLink, char *weatherDescription)


Detailed Description

This class is in charge of grabbing weather from accuweather.com for any given zip code. Its primary function is getWeather().


Member Function Documentation

bool Weather::getWeather char *  zip,
time_t  time,
char *  weatherLink,
char *  pictureLink,
char *  weatherDescription
 

Given a char* representing the five-digit zipcode you are interested in and a time_t representing the future time you are interested in, getWeather() accesses accuweather.com, parsing its html, and finds the relevant weather information for that zipcode and time if it's available. If time and zip are valid (see below), getWeather() will fill in the remaining three out parameters.

Parameters:
zip Zipcode of location for which caller wants weather information . Only the first five digits provided will be used, all others will be ignored.
time Time for which caller wants weather information. Must be in the future and within the next 14 days (how long accuweather.com has weather information for).
weatherLink Out parameter filled in by getWeather(), provides the url to the accuweather.com for that time and zipcode. The char* must be allocated by the caller and be at least 300 chars in length.
pictureLink Out parameter filled in by getWeateher(), provides the url to the image relating to the weather for that time and zipcode. The char* must be allocated by the caller and be at least 300 chars in length.
weatherDescription Out parameter filled in by getWeather(), provides a short description of the weather for that time and zipcode including high and low temperatures and a sentence or two. The char* must be allocated by the caller and be at least 300 chars in length.
Returns:
false if time is not within next 14 days, or if access to accuweather.com fails, or if zipcode is invalid. returns true 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