2 // Copyright (c) 2020 Fraunhofer Institute for Applied Information Technology (FIT)
3 // Network Research Group (NET)
4 // Schloss Birlinghoven, 53754 Sankt Augustin, GERMANY
5 // Contact: support@wiback.org
7 // This file is part of the SENF code tree.
8 // It is licensed under the 3-clause BSD License (aka New BSD License).
9 // See LICENSE.txt in the top level directory for details or visit
10 // https://opensource.org/licenses/BSD-3-Clause
15 \brief EventHook internal header */
17 #ifndef IH_SENF_Scheduler_EventHook_
18 #define IH_SENF_Scheduler_EventHook_ 1
21 #include <senf/Utils/singleton.hh>
23 //-/////////////////////////////////////////////////////////////////////////////////////////////////
32 class EventHookDispatcher
33 : public singleton<EventHookDispatcher>
36 using singleton<EventHookDispatcher>::instance;
37 using singleton<EventHookDispatcher>::alive;
39 void add(EventHook & event);
40 void remove(EventHook & event);
47 EventHookDispatcher();
48 ~EventHookDispatcher();
50 typedef boost::intrusive::list< EventHook,
51 boost::intrusive::constant_time_size<false>,
52 boost::intrusive::base_hook<EventHookListBase> > EventList;
56 friend void senf::scheduler::restart();
57 friend class singleton<EventHookDispatcher>;
62 //-/////////////////////////////////////////////////////////////////////////////////////////////////
70 // c-file-style: "senf"
71 // indent-tabs-mode: nil
72 // ispell-local-dictionary: "american"
73 // compile-command: "scons -u test"