From f8f2506a38a86c19a615fdbc692826bc4af3b417 Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Tue, 18 Apr 2017 16:18:03 -0400 Subject: [PATCH] add graph_has_property for lcc --- .../graph/properties_Linear_cell_complex.h | 100 ++++++++++-------- 1 file changed, 55 insertions(+), 45 deletions(-) diff --git a/Linear_cell_complex/include/CGAL/boost/graph/properties_Linear_cell_complex.h b/Linear_cell_complex/include/CGAL/boost/graph/properties_Linear_cell_complex.h index 61d85c770d1..7fc115153f2 100644 --- a/Linear_cell_complex/include/CGAL/boost/graph/properties_Linear_cell_complex.h +++ b/Linear_cell_complex/include/CGAL/boost/graph/properties_Linear_cell_complex.h @@ -352,15 +352,14 @@ struct LCC_property_map // // external indices // -template <> +/* + template <> struct LCC_property_map { template struct bind_ { - // typedef internal::Polyhedron_edge_index_map_external type; - typedef internal::Edge_index_accessor< - typename boost::graph_traits::edge_descriptor> type; + typedef internal::Polyhedron_edge_index_map_external type; typedef type const_type; }; }; @@ -371,8 +370,7 @@ struct LCC_property_map template struct bind_ { - //typedef internal::Polyhedron_index_map_external< - typedef internal::Index_accessor::halfedge_descriptor> type; typedef type const_type; }; @@ -385,9 +383,8 @@ struct LCC_property_map template struct bind_ { - //typedef internal::Polyhedron_index_map_external< - typedef internal::Index_accessor::vertex_descriptor> type; + typedef internal::Polyhedron_index_map_external< + typename boost::graph_traits::vertex_descriptor> type; typedef type const_type; }; }; @@ -398,55 +395,53 @@ struct LCC_property_map template struct bind_ { - //typedef internal::Polyhedron_index_map_external< - typedef internal::Index_accessor::face_descriptor> type; + typedef internal::Polyhedron_index_map_external< + typename boost::graph_traits::face_descriptor> type; typedef type const_type; }; }; +*/ } // namespace CGAL namespace CGAL{ +/* template -typename boost::property_map::const_type +typename boost::property_map::const_type get(boost::halfedge_external_index_t, CGAL_LCC_TYPE const&) { - return typename boost::property_map::const_type(); - /* CGAL_LCC_TYPE& ncmap=const_cast(cmap); + CGAL_LCC_TYPE& ncmap=const_cast(cmap); return typename boost::property_map:: - const_type(halfedges(ncmap).begin(), halfedges(ncmap).end(), num_halfedges(ncmap)); */ + const_type(halfedges(ncmap).begin(), halfedges(ncmap).end(), num_halfedges(ncmap)); } template -typename boost::property_map::const_type +typename boost::property_map::const_type get(boost::vertex_external_index_t, CGAL_LCC_TYPE const&) { - return typename boost::property_map::const_type(); - /* CGAL_LCC_TYPE& ncmap=const_cast(cmap); + CGAL_LCC_TYPE& ncmap=const_cast(cmap); return typename boost::property_map:: - const_type(vertices(ncmap).begin(), vertices(ncmap).end(), num_vertices(ncmap)); */ + const_type(vertices(ncmap).begin(), vertices(ncmap).end(), num_vertices(ncmap)); } template -typename boost::property_map::const_type +typename boost::property_map::const_type get(boost::edge_external_index_t, CGAL_LCC_TYPE const&) { - return typename boost::property_map::const_type(); - /*return typename boost::property_map:: - const_type(const_cast(cmap));*/ + return typename boost::property_map:: + const_type(const_cast(cmap)); } template -typename boost::property_map::const_type +typename boost::property_map::const_type get(boost::face_external_index_t, CGAL_LCC_TYPE const&) { - return typename boost::property_map::const_type(); - /*CGAL_LCC_TYPE& ncmap=const_cast(cmap); + CGAL_LCC_TYPE& ncmap=const_cast(cmap); return typename boost::property_map:: - const_type(faces(ncmap).begin(), faces(ncmap).end(), num_faces(ncmap));*/ + const_type(faces(ncmap).begin(), faces(ncmap).end(), num_faces(ncmap)); } +*/ /* template @@ -501,43 +496,40 @@ get(boost::edge_weight_t, CGAL_LCC_TYPE const& cmap) } // the same blurb for non-const +/* template -typename boost::property_map::type +typename boost::property_map::type get(boost::halfedge_external_index_t, CGAL_LCC_TYPE&) { - return typename boost::property_map::type(); -/* return typename boost::property_map:: - type(halfedges(cmap).begin(), halfedges(cmap).end(), num_halfedges(cmap));*/ + return typename boost::property_map:: + type(halfedges(cmap).begin(), halfedges(cmap).end(), num_halfedges(cmap)); } template -typename boost::property_map::type +typename boost::property_map::type get(boost::vertex_external_index_t, CGAL_LCC_TYPE&) { - return typename boost::property_map::type(); -/* return typename boost::property_map:: - type(vertices(cmap).begin(), vertices(cmap).end(), num_vertices(cmap));*/ + return typename boost::property_map:: + type(vertices(cmap).begin(), vertices(cmap).end(), num_vertices(cmap)); } template -typename boost::property_map::type +typename boost::property_map::type get(boost::edge_external_index_t, CGAL_LCC_TYPE& cmap) { - return typename boost::property_map::type(cmap); - /*return typename boost::property_map:: - type(const_cast(cmap));*/ + return typename boost::property_map:: + type(const_cast(cmap)); } template -typename boost::property_map::type +typename boost::property_map::type get(boost::face_external_index_t, CGAL_LCC_TYPE&) { - return typename boost::property_map::type(); - /*return typename boost::property_map:: - type(faces(cmap).begin(), faces(cmap).end(), num_faces(cmap));*/ + return typename boost::property_map:: + type(faces(cmap).begin(), faces(cmap).end(), num_faces(cmap)); } - +*/ template typename boost::property_map::type get(boost::edge_weight_t, CGAL_LCC_TYPE & cmap) @@ -569,6 +561,24 @@ struct property_map typedef typename map_gen::type type; typedef typename map_gen::const_type const_type; }; + + template + struct graph_has_property: CGAL::Tag_true {}; + + template + struct graph_has_property: CGAL::Tag_true {}; + + template + struct graph_has_property: CGAL::Tag_true {}; + + template + struct graph_has_property: CGAL::Tag_true {}; + + template + struct graph_has_property: CGAL::Tag_true {}; + + template + struct graph_has_property: CGAL::Tag_true {}; } // namespace boost