/home/martin/workspace/OpenStreetNav/src/osmdb/ElementCopy.h
Go to the documentation of this file.
00001 /*
00002  * ElementCopy.h
00003  *
00004  *  Created on: Jan 7, 2012
00005  *      Author: martin
00006  */
00007 
00008 #ifndef ELEMENTCOPY_H_
00009 #define ELEMENTCOPY_H_
00010 
00011 #include "ElementImporter.h"
00012 #include "OsmDatabase.h"
00013 
00014 namespace osmdb
00015 {
00016 
00021 class ElementCopy : public ElementImporter
00022 {
00023 public:
00028     ElementCopy(OsmDatabase& db);
00029     void start_copy();
00030     void end_copy();
00031     void insert_node(osm::Node const& nd);
00032     void insert_way(osm::Way const& w);
00033     void insert_relation(osm::Relation const& rel);
00034 
00035     void insert_member_node(int64_t rel_id, std::string const& role, int64_t node_id);
00036     void insert_member_way(int64_t rel_id, std::string const& role, int64_t way_id);
00037     void insert_member_relation(int64_t parent_id, std::string const& role, int64_t child_id);
00038 
00039     virtual ~ElementCopy();
00040 private:
00041     OsmDatabase& db;
00042     psql::Statement<psql::BindTypes<>, psql::RetTypes<>, psql::CopyTypes<int, int64_t, int64_t, int, double, double, std::string, std::string> > copy;
00043 };
00044 
00045 } /* namespace osmdb */
00046 #endif /* ELEMENTCOPY_H_ */
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines