#include #include #include #include // My item class: no static functor is associated with Face_attribute. struct Myitem { template struct Dart_wrapper { typedef CGAL::Cell_attribute Face_attribute; // A weight typedef CGAL::cpp11::tuple Attributes; }; }; // Definition of my generalized map. typedef CGAL::Generalized_map<3,Myitem> GMap_3; typedef GMap_3::Dart_handle Dart_handle; typedef GMap_3::Attribute_type<2>::type Face_attribute; // Functor called when two faces are merged. struct Merge_functor { // operator() automatically called before a merge. void operator()(Face_attribute& ca1, Face_attribute& ca2) { ca1.info()=ca1.info()+ca2.info(); // Update can be done incrementally. std::cout<<"After on merge faces: info of face1="<()=boost::function(); // 8) Remove one edge: this merges two faces, however no dynamic // functor is called (because it was removed). gm.remove_cell<1>(resdart); // 9) Display all the values of 2-attributes. display_map_and_2attributes(gm); return EXIT_SUCCESS; }