00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef QUERY_HPP
00026 #define QUERY_HPP
00027
00028 #include <mapnik/filter.hpp>
00029 #include <mapnik/envelope.hpp>
00030 #include <mapnik/feature.hpp>
00031
00032 #include <set>
00033 #include <limits>
00034
00035 namespace mapnik {
00036 class query
00037 {
00038 private:
00039 Envelope<double> bbox_;
00040 double resolution_;
00041 std::set<std::string> names_;
00042 public:
00043
00044 explicit query(const Envelope<double>& bbox, double resolution)
00045 : bbox_(bbox),
00046 resolution_(resolution)
00047 {}
00048
00049
00050 query(const query& other)
00051 : bbox_(other.bbox_),
00052 resolution_(other.resolution_),
00053 names_(other.names_)
00054 {}
00055
00056 query& operator=(const query& other)
00057 {
00058 if (this == &other) return *this;
00059 bbox_=other.bbox_;
00060 resolution_=other.resolution_;
00061 names_=other.names_;
00062 return *this;
00063 }
00064
00065 double resolution() const
00066 {
00067 return resolution_;
00068 }
00069
00070 const Envelope<double>& get_bbox() const
00071 {
00072 return bbox_;
00073 }
00074
00075 void add_property_name(const std::string& name)
00076 {
00077 names_.insert(name);
00078 }
00079
00080 const std::set<std::string>& property_names() const
00081 {
00082 return names_;
00083 }
00084 };
00085 }
00086
00087
00088 #endif //QUERY_HPP