search for: addsubpoly

Displaying 1 result from an estimated 1 matches for "addsubpoly".

2014 Oct 17
1
Holding a large number of SEXPs in C++
...ble, double> Point; typedef std::vector<Point> Polygon; typedef std::vector<Polygon> Polygons; typedef std::vector<Polygons> Regions; struct Holder { void notifyNewRegion(void) const { regions.push_back(Polygons()); } template<typename Iter> void addSubPoly(Iter b, Iter e) { regions.back().push_back(Polygon(b, e)); } private: Regions regions; }; where the reference_type of Iter is convertible to Point. In practice I use pointers in a couple of places to avoid resizing in push_back becoming too expensive. To construct the correspondi...