diff --git a/BGL/include/CGAL/boost/graph/graph_traits_Polyhedron_3.h b/BGL/include/CGAL/boost/graph/graph_traits_Polyhedron_3.h index 66895fa773c..ef8fe02fcd3 100644 --- a/BGL/include/CGAL/boost/graph/graph_traits_Polyhedron_3.h +++ b/BGL/include/CGAL/boost/graph/graph_traits_Polyhedron_3.h @@ -17,8 +17,8 @@ // // Author(s): Andreas Fabri , Fernando Cacciola -#ifndef CGAL_BOOST_GRAPH_POLYHEDRON_GRAPH_TRAITS_H -#define CGAL_BOOST_GRAPH_POLYHEDRON_GRAPH_TRAITS_H +#ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_POLYHEDRON_3_H +#define CGAL_BOOST_GRAPH_GRAPH_TRAITS_POLYHEDRON_3_H #include @@ -208,4 +208,4 @@ out_edges( typename graph_traits< CGAL::Polyhedron_3 >::vertex_descr #undef CGAL_HDS_ -#endif // CGAL_BOOST_GRAPH_POLYHEDRON_GRAPH_TRAITS_H +#endif // CGAL_BOOST_GRAPH_GRAPH_TRAITS_POLYHEDRON_3_H diff --git a/BGL/include/CGAL/boost/graph/halfedge_graph_traits.h b/BGL/include/CGAL/boost/graph/halfedge_graph_traits.h index 6741a99198c..53bbd6e5783 100644 --- a/BGL/include/CGAL/boost/graph/halfedge_graph_traits.h +++ b/BGL/include/CGAL/boost/graph/halfedge_graph_traits.h @@ -24,7 +24,7 @@ CGAL_BEGIN_NAMESPACE -template struct Halfedge_graph_traits ; +template struct halfedge_graph_traits ; CGAL_END_NAMESPACE diff --git a/BGL/include/CGAL/boost/graph/halfedge_graph_traits_HalfedgeDS.h b/BGL/include/CGAL/boost/graph/halfedge_graph_traits_HalfedgeDS.h index 76d75bc2dbd..073b97e28ff 100644 --- a/BGL/include/CGAL/boost/graph/halfedge_graph_traits_HalfedgeDS.h +++ b/BGL/include/CGAL/boost/graph/halfedge_graph_traits_HalfedgeDS.h @@ -17,8 +17,8 @@ // // Author(s): Fernando Cacciola , Andreas Fabri -#ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_HALFEDGEDS_H -#define CGAL_BOOST_GRAPH_GRAPH_TRAITS_HALFEDGEDS_H +#ifndef CGAL_BOOST_GRAPH_HALFEDGE_GRAPH_TRAITS_HALFEDGEDS_H +#define CGAL_BOOST_GRAPH_HALFEDGE_GRAPH_TRAITS_HALFEDGEDS_H #include #include @@ -85,4 +85,4 @@ public : CGAL_END_NAMESPACE -#endif // CGAL_BOOST_GRAPH_GRAPH_TRAITS_HALFEDGEDS_H +#endif // CGAL_BOOST_GRAPH_HALFEDGE_GRAPH_TRAITS_HALFEDGEDS_H diff --git a/BGL/include/CGAL/boost/graph/halfedge_graph_traits_Polyhedron_3.h b/BGL/include/CGAL/boost/graph/halfedge_graph_traits_Polyhedron_3.h index 9947e046738..3b99097320d 100644 --- a/BGL/include/CGAL/boost/graph/halfedge_graph_traits_Polyhedron_3.h +++ b/BGL/include/CGAL/boost/graph/halfedge_graph_traits_Polyhedron_3.h @@ -17,11 +17,11 @@ // // Author(s) : Fernando Caccciola -#ifndef CGAL_BOOST_GRAPH_POLYHEDRON_HALFEDGE_GRAPH_TRAITS_H -#define CGAL_BOOST_GRAPH_POLYHEDRON_HALFEDGE_GRAPH_TRAITS_H +#ifndef CGAL_BOOST_GRAPH_HALFEDGE_GRAPH_TRAITS_POLYHEDRON_3_H +#define CGAL_BOOST_GRAPH_HALFEDGE_GRAPH_TRAITS_POLYHEDRON_3_H #include -#include +#include #include #include @@ -37,18 +37,18 @@ CGAL_BEGIN_NAMESPACE // Const versions // template -struct Halfedge_graph_traits< CGAL::Polyhedron_3 const > +struct halfedge_graph_traits< CGAL::Polyhedron_3 const > : CGAL::HDS_halfedge_graph_traits< CGAL::Polyhedron_3 const> { }; template -inline std::pair const>::undirected_edge_iterator - ,typename Halfedge_graph_traits< Polyhedron_3 const>::undirected_edge_iterator +inline std::pair const>::undirected_edge_iterator + ,typename halfedge_graph_traits< Polyhedron_3 const>::undirected_edge_iterator > undirected_edges( Polyhedron_3 const& p ) { - typedef typename Halfedge_graph_traits< Polyhedron_3 const>::undirected_edge_iterator Iter; + typedef typename halfedge_graph_traits< Polyhedron_3 const>::undirected_edge_iterator Iter; return std::make_pair( Iter(p.edges_begin()), Iter(p.edges_end()) ); } @@ -105,18 +105,18 @@ next_edge_cw( typename boost::graph_traits< Polyhedron_3 const>::edg // template -struct Halfedge_graph_traits< CGAL::Polyhedron_3 > +struct halfedge_graph_traits< CGAL::Polyhedron_3 > : CGAL::HDS_halfedge_graph_traits< CGAL::Polyhedron_3 > { }; template -inline std::pair >::undirected_edge_iterator - ,typename Halfedge_graph_traits< Polyhedron_3 >::undirected_edge_iterator +inline std::pair >::undirected_edge_iterator + ,typename halfedge_graph_traits< Polyhedron_3 >::undirected_edge_iterator > undirected_edges( Polyhedron_3& p ) { - typedef typename Halfedge_graph_traits< Polyhedron_3 >::undirected_edge_iterator Iter; + typedef typename halfedge_graph_traits< Polyhedron_3 >::undirected_edge_iterator Iter; return std::make_pair( Iter(p.edges_begin()), Iter(p.edges_end()) ); } @@ -176,4 +176,4 @@ CGAL_END_NAMESPACE #undef CGAL_HDS_ -#endif // CGAL_BOOST_GRAPH_POLYHEDRON_HALFEDGE_GRAPH_TRAITS_H +#endif // CGAL_BOOST_GRAPH_HALFEDGE_GRAPH_TRAITS_POLYHEDRON_3_H diff --git a/BGL/include/CGAL/boost/graph/named_function_params.h b/BGL/include/CGAL/boost/graph/named_function_params.h index 8a0317a8c78..ffdc001ea41 100644 --- a/BGL/include/CGAL/boost/graph/named_function_params.h +++ b/BGL/include/CGAL/boost/graph/named_function_params.h @@ -50,6 +50,7 @@ CGAL_BEGIN_NAMESPACE + enum vertex_is_fixed_t { vertex_is_fixed } ; enum set_cache_policy_t { set_cache_policy } ; enum get_cost_policy_t { get_cost_policy } ; enum get_cost_policy_params_t { get_cost_policy_params } ; @@ -63,8 +64,12 @@ CGAL_BEGIN_NAMESPACE typedef Base next_type; typedef Tag tag_type; typedef T value_type; + + cgal_bgl_named_params() { } + cgal_bgl_named_params(T v) : m_value(v) { } cgal_bgl_named_params(T v, const Base& b) : Base(b), m_value(v) { } + T m_value; template @@ -213,34 +218,34 @@ CGAL_BEGIN_NAMESPACE } template - cgal_bgl_named_params - get_cost(const GetCost& p) const + cgal_bgl_named_params + get_cost(const GetCost& p) { - typedef cgal_bgl_named_params Params; + typedef cgal_bgl_named_params Params; return Params(p); } template - cgal_bgl_named_params - get_cost_params(const GetCostParams& p) const + cgal_bgl_named_params + get_cost_params(const GetCostParams& p) { - typedef cgal_bgl_named_params Params; + typedef cgal_bgl_named_params Params; return Params(p); } template - cgal_bgl_named_params - get_placement(const GetPlacement& p) const + cgal_bgl_named_params + get_placement(const GetPlacement& p) { - typedef cgal_bgl_named_params Params; + typedef cgal_bgl_named_params Params; return Params(p); } template - cgal_bgl_named_params - get_placement_params(const GetPlacementParams& p) const + cgal_bgl_named_params + get_placement_params(const GetPlacementParams& p) { - typedef cgal_bgl_named_params Params; + typedef cgal_bgl_named_params Params; return Params(p); } @@ -255,7 +260,7 @@ CGAL_BEGIN_NAMESPACE boost::property_value< cgal_bgl_named_params, Tag2>::type T2; T2* t2 = 0; typedef boost::detail::property_value_dispatch Dispatcher; - return boost::Dispatcher::const_get_value(p, t2, tag2); + return Dispatcher::const_get_value(p, t2, tag2); } CGAL_END_NAMESPACE diff --git a/BGL/include/CGAL/boost/graph/properties.h b/BGL/include/CGAL/boost/graph/properties.h index ac56ae9a46a..96797496a14 100644 --- a/BGL/include/CGAL/boost/graph/properties.h +++ b/BGL/include/CGAL/boost/graph/properties.h @@ -27,9 +27,11 @@ CGAL_BEGIN_NAMESPACE -enum edge_is_border_t { edge_is_border } ; -enum vertex_is_border_t { vertex_is_border } ; -enum vertex_point_t { vertex_point } ; +enum vertex_is_border_t { vertex_is_border } ; +enum vertex_point_t { vertex_point } ; +enum vertex_external_index_t { vertex_external_index } ; +enum edge_is_border_t { edge_is_border } ; +enum edge_external_index_t { edge_external_index } ; CGAL_END_NAMESPACE diff --git a/BGL/include/CGAL/boost/graph/properties_Polyhedron_3.h b/BGL/include/CGAL/boost/graph/properties_Polyhedron_3.h index ecb70be21c7..7d8a82a12c0 100644 --- a/BGL/include/CGAL/boost/graph/properties_Polyhedron_3.h +++ b/BGL/include/CGAL/boost/graph/properties_Polyhedron_3.h @@ -17,11 +17,11 @@ // // Author(s): Andreas Fabri , Fernando Cacciola -#ifndef CGAL_BOOST_GRAPH_PROPERTIES_POLYHEDRON_H -#define CGAL_BOOST_GRAPH_PROPERTIES_POLYHEDRON_H +#ifndef CGAL_BOOST_GRAPH_PROPERTIES_POLYHEDRON_3_H +#define CGAL_BOOST_GRAPH_PROPERTIES_POLYHEDRON_3_H #include -#include +#include #include #ifndef CGAL_CFG_NO_TMPL_IN_TMPL_PARAM @@ -136,7 +136,7 @@ public: Polyhedron_vertex_point_map( Polyhedron& ) {} - reference operator[](key_type const& v) const { return e->point(); } + reference operator[](key_type const& v) const { return v->point(); } }; template @@ -159,11 +159,11 @@ public: Polyhedron_vertex_point_const_map( Polyhedron const& ) {} - reference operator[](key_type const& v) const { return e->point(); } + reference operator[](key_type const& v) const { return v->point(); } }; template -class Polyhedron_vertex_index_map_stored : public boost::put_get_helper > +class Polyhedron_vertex_index_map_stored : public boost::put_get_helper > { private: @@ -195,7 +195,7 @@ public: typedef std::size_t reference; typedef typename boost::graph_traits::vertex_descriptor key_type; - Polyhedron_edge_index_map_external( Polyhedron const& p) + Polyhedron_vertex_index_map_external( Polyhedron const& p) : map( p.vertices_begin(),p.vertices_end(),0,std::size_t(-1),p.size_of_vertices() ) {} @@ -233,6 +233,17 @@ struct Polyhedron_property_map }; }; +template <> +struct Polyhedron_property_map +{ + template + struct bind_ + { + typedef Polyhedron_edge_index_map_external type; + typedef Polyhedron_edge_index_map_external const_type; + }; +}; + template <> struct Polyhedron_property_map { @@ -244,17 +255,6 @@ struct Polyhedron_property_map }; }; -template <> -struct Polyhedron_property_map -{ - template - struct bind_ - { - typedef Polyhedron_vertex_is_border_map type; - typedef Polyhedron_vertex_is_border_map const_type; - }; -}; - template <> struct Polyhedron_property_map { @@ -277,6 +277,17 @@ struct Polyhedron_property_map }; }; +template <> +struct Polyhedron_property_map +{ + template + struct bind_ + { + typedef Polyhedron_vertex_index_map_external type; + typedef Polyhedron_vertex_index_map_external const_type; + }; +}; + CGAL_END_NAMESPACE namespace boost @@ -308,9 +319,9 @@ CGAL::Polyhedron_edge_index_map_stored get( edge_index_t, CGAL::Poly template inline -CGAL::Polyhedron_vertex_is_border_map get(CGAL::vertex_is_border_t, CGAL::Polyhedron_3 const& p) +CGAL::Polyhedron_edge_index_map_external get( CGAL::edge_external_index_t, CGAL::Polyhedron_3 const& p) { - CGAL::Polyhedron_vertex_is_border_map m(p); + CGAL::Polyhedron_edge_index_map_external m(p); return m; } @@ -338,6 +349,14 @@ CGAL::Polyhedron_vertex_index_map_stored get(vertex_index_t, CGAL::P return m; } +template +inline +CGAL::Polyhedron_vertex_index_map_external get(CGAL::vertex_external_index_t, CGAL::Polyhedron_3 const& p) +{ + CGAL::Polyhedron_vertex_index_map_external m(p); + return m; +} + template struct property_map, Tag> @@ -390,4 +409,4 @@ struct vertex_property_type > #undef CGAL_HDS_PARAM_ -#endif // CGAL_BOOST_GRAPH_POLYHEDRON_BGL_PROPERTIES_H +#endif // CGAL_BOOST_GRAPH_PROPERTIES_POLYHEDRON_3_H