/home/martin/workspace/OpenStreetNav/src/osmdb/DisplayDB.h
Go to the documentation of this file.
00001 /*
00002  * DisplayDB.h
00003  *
00004  *  Created on: Nov 12, 2011
00005  *      Author: martin
00006  */
00007 
00008 #ifndef DISPLAYDB_H_
00009 #define DISPLAYDB_H_
00010 
00011 #include "OsmDatabase.h"
00012 #include "../displayer/DisplayProvider.h"
00013 #include "ToShowSelectCollection.h"
00014 #include "PropertiesSelection.h"
00015 
00016 namespace osmdb
00017 {
00018 
00023 class DisplayDB : public display::DisplayProvider
00024 {
00025 public:
00033     DisplayDB(OsmDatabase& db, std::string const& path_base, int min_zoom, int max_zoom);
00034     virtual ~DisplayDB();
00035     std::vector<std::unique_ptr<display::DisplayElement> > const& get_display_elements();
00036     OsmDatabase& get_db();
00037     void set_bounds(geo::Point const& topleft, geo::Point const& bottomright, int zoom);
00038     std::vector<std::unique_ptr<osm::Element> > get_selected(geo::Point const& topleft, geo::Point const& bottomright, int zoom);
00039     double center_lat();
00040     double center_lon();
00041 private:
00042     osmdb::OsmDatabase& db;
00043     osmdb::PropertiesSelection pdb;
00044     std::vector<std::unique_ptr<display::DisplayElement> > display_elements;
00045     double clat;
00046     double clon;
00047     int minz, maxz;
00048     ToShowSelectCollection coll;
00049     psql::Statement<psql::BindTypes<>, psql::RetTypes<double, double, double, double> > get_bounds;
00050 };
00051 
00052 } /* namespace display */
00053 #endif /* DISPLAYDB_H_ */
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines