Main Page | Namespace List | Class List | Directories | File List | Class Members | File Members

SearchParser Class Reference

#include <SearchParser.H>

Collaboration diagram for SearchParser:

Collaboration graph
[legend]
List of all members.

Detailed Description

The SearchParser acts as an interface between the web front end, the ai search algorithm and the database. It takes in a formatted address, checks to see if it exists and returns the information the database returns, properly formatted. It takes in seg_t's (streets) and calls the AI to find the route between them. It then formates the returned data and returns it.


Public Types

typedef SearchParser::StreetAddress StreetAddress_t
 Struct design to hold information regarding a street address in the database, including its name and number.

Public Member Functions

StreetAddress_t parseAddress (string)
 Parses the address into street number and name.
string createMatchXML (vector< seg_t * >)
 XML producer/formatter.
string createStreetXML (seg_t)
 XML producer/formatter.
string createStreetCGI (seg_t)
 CGI producer/formatter.
string createPathXML (path_t)
 XML producer/formatter.
string itostring (int)
 Converts an int to a string.
string itostring (long)
 Converts a long to a string.
string itostring (double)
 Converts a double to a string.
string longitostring (double)
 Converts a long int to a string.
string num2base (double num)
 Converts numbers to alternate (and faster) bases.
string toUpper (string)
 Converts a string to uppercase.
void loadMap ()
 Loads the map data structure of abbreviations.
 SearchParser (DBInterface *db)
 Default Constructor.
 ~SearchParser ()
 Default Deconstructor.
string getAddress (string, string, string, string, string, string, string, string, bool)
 Method to retrieve and format starting and ending addresses of a route.
string getRoute (string, string, double, double)
 Finds an a->b route.
string getRoute (string, double, double, double)
 Finds an a->a route.

Public Attributes

string xmlHeader
 String storing the properly formatted xml route information.
map< string, string > AbreviationMap
 Map data structure storing common street identifier abbreviations (i.e. ST, RD, etc.) and their proper forms.
DBInterfacem_db
 Pointer to the database.

Classes

struct  StreetAddress
 Struct design to hold information regarding a street address in the database, including its name and number. More...


Member Typedef Documentation

typedef struct SearchParser::StreetAddress SearchParser::StreetAddress_t
 

Struct design to hold information regarding a street address in the database, including its name and number.


Constructor & Destructor Documentation

SearchParser::SearchParser DBInterface db  ) 
 

Default Constructor.

Here is the call graph for this function:

SearchParser::~SearchParser  ) 
 

Default Deconstructor.


Member Function Documentation

string SearchParser::createMatchXML vector< seg_t * >   ) 
 

XML producer/formatter.

Here is the call graph for this function:

string SearchParser::createPathXML path_t   ) 
 

XML producer/formatter.

Here is the call graph for this function:

string SearchParser::createStreetCGI seg_t   ) 
 

CGI producer/formatter.

Here is the call graph for this function:

string SearchParser::createStreetXML seg_t   ) 
 

XML producer/formatter.

Here is the call graph for this function:

string SearchParser::getAddress string  ,
string  ,
string  ,
string  ,
string  ,
string  ,
string  ,
string  ,
bool 
 

Method to retrieve and format starting and ending addresses of a route.

Here is the call graph for this function:

string SearchParser::getRoute string  ,
double  ,
double  ,
double 
 

Finds an a->a route.

Here is the call graph for this function:

string SearchParser::getRoute string  ,
string  ,
double  ,
double 
 

Finds an a->b route.

Here is the call graph for this function:

string SearchParser::itostring double   ) 
 

Converts a double to a string.

string SearchParser::itostring long   ) 
 

Converts a long to a string.

string SearchParser::itostring int   ) 
 

Converts an int to a string.

void SearchParser::loadMap  ) 
 

Loads the map data structure of abbreviations.

string SearchParser::longitostring double   ) 
 

Converts a long int to a string.

string SearchParser::num2base double  num  ) 
 

Converts numbers to alternate (and faster) bases.

SearchParser::StreetAddress_t SearchParser::parseAddress string   ) 
 

Parses the address into street number and name.

string SearchParser::toUpper string   ) 
 

Converts a string to uppercase.


Member Data Documentation

map<string, string> SearchParser::AbreviationMap
 

Map data structure storing common street identifier abbreviations (i.e. ST, RD, etc.) and their proper forms.

DBInterface* SearchParser::m_db
 

Pointer to the database.

string SearchParser::xmlHeader
 

String storing the properly formatted xml route information.


The documentation for this class was generated from the following files:
Generated on Mon May 16 11:08:56 2005 for BikeQuest by  doxygen 1.4.0