From 6170491b190194fe17e1c14d60d3e1582e6689a9 Mon Sep 17 00:00:00 2001 From: Arnaud Becheler <8360330+Becheler@users.noreply.github.com> Date: Thu, 27 Aug 2026 02:35:14 +0200 Subject: [PATCH] remove event stubs --- include/boost/graph/breadth_first_search.hpp | 10 --------- include/boost/graph/depth_first_search.hpp | 10 --------- .../boost/graph/maximum_adjacency_search.hpp | 5 ----- include/boost/graph/visitors.hpp | 21 ------------------- 4 files changed, 46 deletions(-) diff --git a/include/boost/graph/breadth_first_search.hpp b/include/boost/graph/breadth_first_search.hpp index 0993d55d1..d1493cf20 100644 --- a/include/boost/graph/breadth_first_search.hpp +++ b/include/boost/graph/breadth_first_search.hpp @@ -224,16 +224,6 @@ template < class Visitors = null_visitor > class bfs_visitor return graph::bfs_visitor_event_not_overridden(); } - BOOST_GRAPH_EVENT_STUB(on_initialize_vertex, bfs) - BOOST_GRAPH_EVENT_STUB(on_discover_vertex, bfs) - BOOST_GRAPH_EVENT_STUB(on_examine_vertex, bfs) - BOOST_GRAPH_EVENT_STUB(on_examine_edge, bfs) - BOOST_GRAPH_EVENT_STUB(on_tree_edge, bfs) - BOOST_GRAPH_EVENT_STUB(on_non_tree_edge, bfs) - BOOST_GRAPH_EVENT_STUB(on_gray_target, bfs) - BOOST_GRAPH_EVENT_STUB(on_black_target, bfs) - BOOST_GRAPH_EVENT_STUB(on_finish_vertex, bfs) - protected: Visitors m_vis; }; diff --git a/include/boost/graph/depth_first_search.hpp b/include/boost/graph/depth_first_search.hpp index 7b354c499..4ad4e160f 100644 --- a/include/boost/graph/depth_first_search.hpp +++ b/include/boost/graph/depth_first_search.hpp @@ -365,16 +365,6 @@ template < class Visitors = null_visitor > class dfs_visitor invoke_visitors(m_vis, u, g, ::boost::on_finish_vertex()); } - BOOST_GRAPH_EVENT_STUB(on_initialize_vertex, dfs) - BOOST_GRAPH_EVENT_STUB(on_start_vertex, dfs) - BOOST_GRAPH_EVENT_STUB(on_discover_vertex, dfs) - BOOST_GRAPH_EVENT_STUB(on_examine_edge, dfs) - BOOST_GRAPH_EVENT_STUB(on_tree_edge, dfs) - BOOST_GRAPH_EVENT_STUB(on_back_edge, dfs) - BOOST_GRAPH_EVENT_STUB(on_forward_or_cross_edge, dfs) - BOOST_GRAPH_EVENT_STUB(on_finish_edge, dfs) - BOOST_GRAPH_EVENT_STUB(on_finish_vertex, dfs) - protected: Visitors m_vis; }; diff --git a/include/boost/graph/maximum_adjacency_search.hpp b/include/boost/graph/maximum_adjacency_search.hpp index b8161f328..1a8c2781b 100644 --- a/include/boost/graph/maximum_adjacency_search.hpp +++ b/include/boost/graph/maximum_adjacency_search.hpp @@ -104,11 +104,6 @@ class mas_visitor invoke_visitors(m_vis, u, g, ::boost::on_finish_vertex()); } - BOOST_GRAPH_EVENT_STUB(on_initialize_vertex, mas) - BOOST_GRAPH_EVENT_STUB(on_start_vertex, mas) - BOOST_GRAPH_EVENT_STUB(on_examine_edge, mas) - BOOST_GRAPH_EVENT_STUB(on_finish_vertex, mas) - protected: Visitors m_vis; }; diff --git a/include/boost/graph/visitors.hpp b/include/boost/graph/visitors.hpp index d98262bcc..80508d4b4 100644 --- a/include/boost/graph/visitors.hpp +++ b/include/boost/graph/visitors.hpp @@ -59,13 +59,6 @@ namespace detail on_edge_not_minimized_num }; - template < typename Event, typename Visitor > - struct functor_to_visitor : Visitor - { - typedef Event event_filter; - functor_to_visitor(const Visitor& visitor) : Visitor(visitor) {} - }; - } // namespace detail struct on_no_event @@ -409,20 +402,6 @@ inline property_put< PropertyMap, EventTag > put_property( return property_put< PropertyMap, EventTag >(property_map, value); } -#define BOOST_GRAPH_EVENT_STUB(Event, Kind) \ - typedef ::boost::Event Event##_type; \ - template < typename Visitor > \ - Kind##_visitor< std::pair< \ - detail::functor_to_visitor< Event##_type, Visitor >, Visitors > > \ - do_##Event(Visitor visitor) \ - { \ - typedef std::pair< \ - detail::functor_to_visitor< Event##_type, Visitor >, Visitors > \ - visitor_list; \ - typedef Kind##_visitor< visitor_list > result_type; \ - return result_type(visitor_list(visitor, m_vis)); \ - } - } /* namespace boost */ #endif