diff --git a/BGL/doc/BGL/Concepts/FaceGraph.h b/BGL/doc/BGL/Concepts/FaceGraph.h index 913b0ae8173..7f8b12a8b5a 100644 --- a/BGL/doc/BGL/Concepts/FaceGraph.h +++ b/BGL/doc/BGL/Concepts/FaceGraph.h @@ -8,6 +8,8 @@ maintain faces described by halfedges, to provide access from a face to an incident halfedge, and to provide access from a halfedge to its incident face. +A partial specialization must be provided for `CGAL::graph_has_property` +for each internal property map available. \cgalAssociatedTypesBegin \cgalAssociatedTypeBegin{boost::graph_traits::%face_descriptor} A face descriptor corresponds to a unique face in an abstract graph instance. diff --git a/BGL/doc/BGL/Concepts/HalfedgeGraph.h b/BGL/doc/BGL/Concepts/HalfedgeGraph.h index 19844256407..2bd40b8b631 100644 --- a/BGL/doc/BGL/Concepts/HalfedgeGraph.h +++ b/BGL/doc/BGL/Concepts/HalfedgeGraph.h @@ -15,6 +15,9 @@ in another cycle, namely the cycle of halfedges which are incident to the same vertex. We refer to \ref PkgBGLIterators for a description of iterators and circulators for these halfedge cycles. +A partial specialization must be provided for `CGAL::graph_has_property` +for each internal property map available. + \cgalAssociatedTypesBegin diff --git a/BGL/include/CGAL/boost/graph/Face_filtered_graph.h b/BGL/include/CGAL/boost/graph/Face_filtered_graph.h index 4bc180626f1..03a98f32ed8 100644 --- a/BGL/include/CGAL/boost/graph/Face_filtered_graph.h +++ b/BGL/include/CGAL/boost/graph/Face_filtered_graph.h @@ -1111,6 +1111,13 @@ put(PropertyTag ptag, const Face_filtered_graph& w, put(ptag, w.graph(), k, v); } +template +struct graph_has_property, PropertyTag> + : graph_has_property {}; }//end namespace CGAL namespace boost { @@ -1124,13 +1131,6 @@ struct property_map,Proper typedef typename boost::property_map::const_type const_type; }; -template -struct graph_has_property, PropertyTag> - : graph_has_property {}; //specializations for indices diff --git a/BGL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph.h b/BGL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph.h index ce92302b96b..11d5adeeb19 100644 --- a/BGL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph.h +++ b/BGL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph.h @@ -828,6 +828,9 @@ std::size_t hash_value(CGAL::Gwdwg_descriptor d) return hash_value(d.descriptor); } +template +struct graph_has_property, PropertyTag> + : graph_has_property {}; }//end namespace CGAL namespace boost { @@ -837,9 +840,6 @@ namespace boost { typedef CGAL::Graph_with_descriptor_with_graph_property_map::const_type> const_type; }; - template - struct graph_has_property, PropertyTag> - : graph_has_property {}; }// namespace boost diff --git a/BGL/include/CGAL/boost/graph/copy_face_graph.h b/BGL/include/CGAL/boost/graph/copy_face_graph.h index 0ee1381d688..2517d5ee982 100644 --- a/BGL/include/CGAL/boost/graph/copy_face_graph.h +++ b/BGL/include/CGAL/boost/graph/copy_face_graph.h @@ -269,7 +269,7 @@ void copy_face_graph(const SourceMesh& sm, TargetMesh& tm, #endif { internal::copy_face_graph(sm, tm, - boost::graph_has_property(), + CGAL::graph_has_property(), v2v, h2h, f2f, sm_vpm, tm_vpm); } diff --git a/BGL/include/CGAL/boost/graph/named_params_helper.h b/BGL/include/CGAL/boost/graph/named_params_helper.h index 110d2814184..027982c9015 100644 --- a/BGL/include/CGAL/boost/graph/named_params_helper.h +++ b/BGL/include/CGAL/boost/graph/named_params_helper.h @@ -46,7 +46,7 @@ namespace CGAL { class property_map_selector { public: - typedef typename boost::graph_has_property::type Has_internal_pmap; + typedef typename graph_has_property::type Has_internal_pmap; typedef typename boost::mpl::if_c< Has_internal_pmap::value , typename boost::property_map::type , typename boost::cgal_no_property::type @@ -149,7 +149,7 @@ namespace CGAL { typename NamedParametersVPM = NamedParametersGT > class GetGeomTraits { - typedef typename boost::graph_has_property::type + typedef typename CGAL::graph_has_property::type Has_internal_pmap; struct Fake_GT {};//to be used if there is no internal vertex_point_map in PolygonMesh diff --git a/BGL/include/CGAL/boost/graph/properties.h b/BGL/include/CGAL/boost/graph/properties.h index e6fff2e7f76..235eb04a74b 100644 --- a/BGL/include/CGAL/boost/graph/properties.h +++ b/BGL/include/CGAL/boost/graph/properties.h @@ -31,7 +31,29 @@ #include #include - +namespace CGAL{ +/// \ingroup PkgBGLProperties +/// \brief graph_has_property is used to indicate if +/// a model of `HalfedgeGraph` or `FaceGraph` +/// has an internal property associated with the +/// given `PropertyTag`. +/// +/// It inherits from `CGAL::Tag_true` if there is a +/// default internal property map for the +/// corresponding property tag and from +/// `CGAL::Tag_false` otherwise. +/// +/// \tparam Graph a model of `HalfedgeGraph` or `FaceGraph` +/// \tparam PropertyTag the type of a property tag +/// referring to the property of interest. +/// +template +struct graph_has_property +#ifndef DOXYGEN_RUNNING + : CGAL::Tag_false +#endif +{}; +} /// Boost Namespace namespace boost { @@ -57,10 +79,6 @@ enum halfedge_external_index_t { halfedge_external_index } ; enum face_index_t { face_index }; enum face_external_index_t { face_external_index } ; - - -template -struct graph_has_property : CGAL::Tag_false {}; struct cgal_no_property { diff --git a/BGL/include/CGAL/boost/graph/properties_OpenMesh.h b/BGL/include/CGAL/boost/graph/properties_OpenMesh.h index 9bb14c59d49..1df488dc0e7 100644 --- a/BGL/include/CGAL/boost/graph/properties_OpenMesh.h +++ b/BGL/include/CGAL/boost/graph/properties_OpenMesh.h @@ -245,8 +245,6 @@ public: private: const OpenMesh* sm_; }; - - } // CGAL #endif // CGAL_BOOST_GRAPH_PROPERTIES_OPENMESH_H @@ -326,28 +324,30 @@ struct property_map typedef CGAL::OM_point_pmap type; typedef 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 +namespace CGAL{ + +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{}; +} //end CGAL + namespace OpenMesh { diff --git a/BGL/include/CGAL/boost/graph/properties_Seam_mesh.h b/BGL/include/CGAL/boost/graph/properties_Seam_mesh.h index 56c0d47ea69..05c0251d362 100644 --- a/BGL/include/CGAL/boost/graph/properties_Seam_mesh.h +++ b/BGL/include/CGAL/boost/graph/properties_Seam_mesh.h @@ -132,13 +132,12 @@ get(vertex_point_t, const Seam_mesh& sm) return Seam_mesh_point_map(sm, get(vertex_point, sm.mesh())); } -} // namespace CGAL - -namespace boost -{ template struct graph_has_property, CGAL::vertex_point_t> : CGAL::Tag_true {}; -} //boost +} // namespace CGAL + + + #endif // CGAL_PROPERTIES_SEAM_MESH_H diff --git a/Linear_cell_complex/include/CGAL/boost/graph/properties_Linear_cell_complex_for_combinatorial_map.h b/Linear_cell_complex/include/CGAL/boost/graph/properties_Linear_cell_complex_for_combinatorial_map.h index d71817dffc6..2bbcb6c4a12 100644 --- a/Linear_cell_complex/include/CGAL/boost/graph/properties_Linear_cell_complex_for_combinatorial_map.h +++ b/Linear_cell_complex/include/CGAL/boost/graph/properties_Linear_cell_complex_for_combinatorial_map.h @@ -366,7 +366,23 @@ get(boost::edge_weight_t, CGAL_LCC_TYPE & cmap) return typename boost::property_map:: type(cmap); } +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 CGAL namespace boost { @@ -390,24 +406,6 @@ 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 diff --git a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h index 86e634162e3..e4c8466a5db 100644 --- a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h @@ -135,7 +135,7 @@ struct IGT_generator namespace internal { namespace Mesh_3 { template ::value> class Get_face_index_pmap { public: diff --git a/Polyhedron/include/CGAL/boost/graph/properties_Polyhedron_3.h b/Polyhedron/include/CGAL/boost/graph/properties_Polyhedron_3.h index 980e28149dc..c46e98b8a90 100644 --- a/Polyhedron/include/CGAL/boost/graph/properties_Polyhedron_3.h +++ b/Polyhedron/include/CGAL/boost/graph/properties_Polyhedron_3.h @@ -474,25 +474,29 @@ struct vertex_property_type > typedef CGAL::vertex_point_t type; }; + +} // namespace boost + +namespace CGAL{ template -struct graph_has_property, vertex_point_t> +struct graph_has_property, boost::vertex_point_t> : CGAL::Tag_true {}; template -struct graph_has_property, edge_weight_t> +struct graph_has_property, boost::edge_weight_t> : CGAL::Tag_true {}; template -struct graph_has_property, edge_index_t> +struct graph_has_property, boost::edge_index_t> : CGAL::Boolean_tag< CGAL::internal::Has_member_id< - typename graph_traits >::edge_descriptor + typename boost::graph_traits >::edge_descriptor >::value > {}; template -struct graph_has_property, face_index_t> +struct graph_has_property, boost::face_index_t> : CGAL::Boolean_tag< CGAL::internal::Has_member_id< typename CGAL::Polyhedron_3::Facet @@ -501,7 +505,7 @@ struct graph_has_property, face_index_t> {}; template -struct graph_has_property, halfedge_index_t> +struct graph_has_property, boost::halfedge_index_t> : CGAL::Boolean_tag< CGAL::internal::Has_member_id< typename CGAL::Polyhedron_3::Halfedge @@ -510,17 +514,14 @@ struct graph_has_property, halfedge_index_t> {}; template -struct graph_has_property, vertex_index_t> +struct graph_has_property, boost::vertex_index_t> : CGAL::Boolean_tag< CGAL::internal::Has_member_id< typename CGAL::Polyhedron_3::Vertex >::value > {}; - -} // namespace boost - - +}// end CGAL #undef CGAL_HDS_PARAM_ #endif // CGAL_BOOST_GRAPH_PROPERTIES_POLYHEDRON_3_H diff --git a/Surface_mesh/examples/Surface_mesh/sm_derivation.cpp b/Surface_mesh/examples/Surface_mesh/sm_derivation.cpp index ae015517285..9db1bd77c80 100644 --- a/Surface_mesh/examples/Surface_mesh/sm_derivation.cpp +++ b/Surface_mesh/examples/Surface_mesh/sm_derivation.cpp @@ -29,12 +29,14 @@ namespace boost { : public boost::property_map {}; +} + +namespace CGAL{ template struct graph_has_property - : public boost::graph_has_property + : public CGAL::graph_has_property {}; -}; - +} int main() { diff --git a/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh.h b/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh.h index 9005c2f92d6..2b7a61aca24 100644 --- a/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh.h +++ b/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh.h @@ -284,28 +284,29 @@ put(CGAL::vertex_point_t p, const CGAL::Surface_mesh& g, prop[x] = point; } +template +struct graph_has_property, boost::vertex_index_t> + : CGAL::Tag_true {}; +template +struct graph_has_property, boost::edge_index_t> + : CGAL::Tag_true {}; +template +struct graph_has_property, boost::halfedge_index_t> + : CGAL::Tag_true {}; +template +struct graph_has_property, boost::face_index_t> + : CGAL::Tag_true {}; +template +struct graph_has_property, CGAL::vertex_point_t> + : CGAL::Tag_true {}; +template +struct graph_has_property, boost::edge_weight_t> + : CGAL::Tag_true {}; } // CGAL namespace boost { - template - struct graph_has_property, vertex_index_t> - : CGAL::Tag_true {}; - template - struct graph_has_property, edge_index_t> - : CGAL::Tag_true {}; - template - struct graph_has_property, halfedge_index_t> - : CGAL::Tag_true {}; - template - struct graph_has_property, face_index_t> - : CGAL::Tag_true {}; - template - struct graph_has_property, CGAL::vertex_point_t> - : CGAL::Tag_true {}; - template - struct graph_has_property, edge_weight_t> - : CGAL::Tag_true {}; + template