00001 #ifndef SearchParser_h
00002 #define SearchParser_h
00003
00004 #include <iostream>
00005 #include <string>
00006 #include <map>
00007 #include "BQStructs.H"
00008 #include "PathSearchAI.H"
00009 #include "../DBInterface/BQStructs.H"
00010
00011 class DBInterface;
00012
00013 using namespace std;
00014
00016 class SearchParser{
00017
00018 public:
00019
00021 string xmlHeader;
00023 map<string, string> AbreviationMap ;
00024
00026 typedef struct StreetAddress{
00027 string strNum;
00028 vector<string> streetName;
00029 }StreetAddress_t;
00030
00031
00033 StreetAddress_t parseAddress(string);
00034
00036 string createMatchXML(vector<seg_t*>);
00038 string createStreetXML(seg_t);
00040 string createStreetCGI(seg_t);
00042 string createPathXML(path_t);
00043
00045 string itostring(int);
00047 string itostring(long);
00049 string itostring(double);
00051 string longitostring(double);
00053 string num2base(double num);
00055 string toUpper(string);
00056
00058 void loadMap();
00059
00060
00062 DBInterface *m_db;
00063
00064 public:
00065
00067 SearchParser( DBInterface* db );
00069 ~SearchParser();
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00086 string getAddress(string, string, string, string,
00087 string, string, string, string, bool);
00088
00089
00091 string getRoute(string, string, double, double);
00092
00094 string getRoute(string, double, double, double);
00095
00096 };
00097
00098
00099
00100 #endif