/home/martin/workspace/OpenStreetNav/src/xmlparse/XmlParser.h
Go to the documentation of this file.
00001 /*
00002  * XmlParser.h
00003  *
00004  *  Created on: Nov 12, 2011
00005  *      Author: martin
00006  */
00007 
00008 #ifndef XMLPARSER_H_
00009 #define XMLPARSER_H_
00010 
00011 #include "osm_xml-pimpl.hxx"
00012 #include "../elements/osmelements.h"
00013 #include <glibmm/ustring.h>
00014 #include <functional>
00015 
00016 namespace osmxml
00017 {
00018 
00024 class XmlParser
00025 {
00026 public:
00027     XmlParser();
00028     virtual ~XmlParser();
00032     std::function<void (osm::Node const&)> node_handler;
00036     std::function<void (osm::Way const&)> way_handler;
00040     std::function<void (osm::Relation const&)> relation_handler;
00044     std::function<void ()> progress_handler;
00049     void parse_file(std::string const& filename);
00054     void parse_memory(std::string const& mem);
00059     void parse_stream(std::istream& stream);
00060 private:
00061     bound_pimpl bound_p;
00062     member_type_pimpl mt_p;
00063     member_pimpl member_p;
00064     nd_pimpl nd_p;
00065     node_pimpl node_p;
00066     osm_pimpl osm_p;
00067     relation_pimpl rel_p;
00068     tag_pimpl tag_p;
00069     way_pimpl way_p;
00070     xml_schema::string_pimpl string_p;
00071     xml_schema::uri_pimpl uri_p;
00072     xml_schema::long_pimpl long_p;
00073     xml_schema::decimal_pimpl decimal_p;
00074     xml_schema::boolean_pimpl bool_p;
00075     xml_schema::date_time_pimpl date_time_p;
00076     xml_schema::int_pimpl int_p;
00077     xml_schema::document doc_p;
00078 };
00079 
00080 } /* namespace osmxml */
00081 #endif /* XMLPARSER_H_ */
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines