From b918ab4ba71d01b65ea59a35ef25debe69773d83 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Sat, 24 Mar 2018 11:41:30 +0100 Subject: [PATCH] Move internal class from Polyhedron to BGL --- BGL/include/CGAL/boost/graph/properties.h | 40 +++++++++++++++++++ BGL/test/BGL/test_Prefix.h | 7 ---- ...inear_cell_complex_for_combinatorial_map.h | 4 +- .../boost/graph/properties_Polyhedron_3.h | 36 ----------------- 4 files changed, 43 insertions(+), 44 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/properties.h b/BGL/include/CGAL/boost/graph/properties.h index 235eb04a74b..ea4ef6f6d6e 100644 --- a/BGL/include/CGAL/boost/graph/properties.h +++ b/BGL/include/CGAL/boost/graph/properties.h @@ -241,6 +241,46 @@ void init_halfedge_indices(PolygonMesh& pm, HalfedgeIndexMap hid) } //namespace helpers +namespace internal { + + template +struct Index_accessor + : boost::put_get_helper< std::size_t&, Index_accessor > +{ + typedef boost::lvalue_property_map_tag category; + typedef std::size_t& reference; + typedef std::size_t value_type; + typedef Handle key_type; + + reference operator[](Handle h) const { return h->id(); } +}; + +template +struct Edge_index_accessor + : boost::put_get_helper< std::size_t, Edge_index_accessor > +{ + typedef boost::readable_property_map_tag category; + typedef std::size_t reference; + typedef std::size_t value_type; + typedef Handle key_type; + + reference operator[](Handle h) const { return h.id(); } +}; + +template +struct Point_accessor + : boost::put_get_helper< Reference, Point_accessor > +{ + typedef boost::lvalue_property_map_tag category; + typedef Reference reference; + typedef ValueType value_type; + typedef Handle key_type; + + reference operator[](Handle h) const { return h->point(); } +}; + +} // namespace internal + } // namespace CGAL diff --git a/BGL/test/BGL/test_Prefix.h b/BGL/test/BGL/test_Prefix.h index 3eafc956cd8..74aebbdef26 100644 --- a/BGL/test/BGL/test_Prefix.h +++ b/BGL/test/BGL/test_Prefix.h @@ -11,10 +11,6 @@ #include #include -#include - -#include - #include #include #include @@ -22,9 +18,6 @@ #ifdef CGAL_USE_SURFACE_MESH #include #include - -#include -#include #endif #include 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 2bbcb6c4a12..50226e24581 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 @@ -18,13 +18,15 @@ // // Author(s) : Guillaume Damiand // + + #ifndef CGAL_BOOST_GRAPH_PROPERTIES_LINEAR_CELL_COMPLEX_FOR_COMBINATORIAL_MAP_H #define CGAL_BOOST_GRAPH_PROPERTIES_LINEAR_CELL_COMPLEX_FOR_COMBINATORIAL_MAP_H #include #include #include -#include + #define CGAL_LCC_ARGS unsigned int d_, unsigned int ambient_dim, \ class Traits_, \ diff --git a/Polyhedron/include/CGAL/boost/graph/properties_Polyhedron_3.h b/Polyhedron/include/CGAL/boost/graph/properties_Polyhedron_3.h index c46e98b8a90..9550b30ab2d 100644 --- a/Polyhedron/include/CGAL/boost/graph/properties_Polyhedron_3.h +++ b/Polyhedron/include/CGAL/boost/graph/properties_Polyhedron_3.h @@ -103,42 +103,6 @@ struct Wrap_squared } }; - template -struct Index_accessor - : boost::put_get_helper< std::size_t&, Index_accessor > -{ - typedef boost::lvalue_property_map_tag category; - typedef std::size_t& reference; - typedef std::size_t value_type; - typedef Handle key_type; - - reference operator[](Handle h) const { return h->id(); } -}; - -template -struct Edge_index_accessor - : boost::put_get_helper< std::size_t, Edge_index_accessor > -{ - typedef boost::readable_property_map_tag category; - typedef std::size_t reference; - typedef std::size_t value_type; - typedef Handle key_type; - - reference operator[](Handle h) const { return h.id(); } -}; - -template -struct Point_accessor - : boost::put_get_helper< Reference, Point_accessor > -{ - typedef boost::lvalue_property_map_tag category; - typedef Reference reference; - typedef ValueType value_type; - typedef Handle key_type; - - reference operator[](Handle h) const { return h->point(); } -}; - } // internal // the tag we dispatch on from property_map