+ expose iterator interface in mapnik::context

+ make feature_kv_iterator friend of feature_impl
This commit is contained in:
Artem Pavlenko 2012-01-13 17:17:40 +00:00 committed by Artem Pavlenko
parent a3c338c835
commit d75eb788f3

View file

@ -62,6 +62,7 @@ public:
typedef map_type::size_type size_type;
typedef map_type::difference_type difference_type;
typedef map_type::iterator iterator;
typedef map_type::const_iterator const_iterator;
context()
: base_type(mapping_) {}
@ -71,6 +72,9 @@ public:
mapping_.insert(std::make_pair(name,mapping_.size()));
}
const_iterator begin() const { return mapping_.begin();}
const_iterator end() const { return mapping_.end();}
private:
map_type mapping_;
};
@ -79,7 +83,10 @@ typedef boost::shared_ptr<context> context_ptr;
class feature_impl : private boost::noncopyable
{
friend class feature_kv_iterator;
public:
typedef mapnik::value value_type;
typedef std::vector<value_type> cont_type;