~ubuntu-branches/debian/stretch/cgal/stretch

« back to all changes in this revision

Viewing changes to examples/Spatial_searching/searching_with_point_with_info_inplace.cpp

  • Committer: Package Import Robot
  • Author(s): Joachim Reichel
  • Date: 2014-04-05 10:56:43 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20140405105643-jgnrpu2thtx23zfs
Tags: 4.4-1
* New upstream release.
* Remove patches do-not-link-example-with-qt4-support-library.patch and
  fix_jet_fitting_3.patch (applied upstream).

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
 
13
13
typedef std::size_t Point;
14
14
 
15
 
//definition of the property map and get
16
 
//function as friend function to have access to
17
 
//private member
 
15
//definition of a non-mutable lvalue property map,
 
16
//with the get function as a friend function to give it
 
17
//access to the private member
18
18
class My_point_property_map{
19
19
  const std::vector<Point_3>& points;
20
20
public:
21
21
  typedef Point_3 value_type;
22
22
  typedef const value_type& reference;
23
23
  typedef Point key_type;
24
 
  typedef boost::readable_property_map_tag category;  
 
24
  typedef boost::lvalue_property_map_tag category;  
25
25
 
26
26
  My_point_property_map(const std::vector<Point_3>& pts):points(pts){}
27
27
 
 
28
  reference operator[](key_type k) const {return points[k];}
 
29
 
28
30
  friend reference get(const My_point_property_map& ppmap,key_type i) 
29
 
  {return ppmap.points[i];}
 
31
  {return ppmap[i];}
30
32
};
31
33
 
32
34