4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 // Stefan Bund <g0dil@berlios.de>
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the
20 // Free Software Foundation, Inc.,
21 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 \brief Events inline template implementation */
29 #include "detail/EventBinding.hh"
31 #define prefix_ inline
32 ///////////////////////////////cti.p///////////////////////////////////////
34 ///////////////////////////////////////////////////////////////////////////
35 // senf::ppi::EventImplementationHelper<EventType,Self>
37 ////////////////////////////////////////
40 template <class EventType, class Self>
42 senf::ppi::EventImplementationHelper<EventType,Self>::callback(EventArg event,
43 ClockService::clock_type time)
45 binding().callback(event,time);
48 template <class EventType, class Self>
49 prefix_ void senf::ppi::EventImplementationHelper<EventType,Self>::callback(EventArg event)
51 binding().callback(event);
54 ////////////////////////////////////////
57 template <class EventType, class Self>
58 prefix_ senf::ppi::detail::EventBinding<EventType> &
59 senf::ppi::EventImplementationHelper<EventType,Self>::binding()
61 BOOST_ASSERT( static_cast<Self*>(this)->binding_ );
62 return * static_cast<Self*>(this)->binding_;
65 ///////////////////////////////////////////////////////////////////////////
66 // senf::ppi::EventImplementationHelper<void,Self>
68 ////////////////////////////////////////
73 senf::ppi::EventImplementationHelper<void,Self>::callback(ClockService::clock_type time)
75 binding().callback(time);
79 prefix_ void senf::ppi::EventImplementationHelper<void,Self>::callback()
84 ////////////////////////////////////////
88 prefix_ senf::ppi::detail::EventBinding<void> &
89 senf::ppi::EventImplementationHelper<void,Self>::binding()
91 BOOST_ASSERT( static_cast<Self*>(this)->binding_ );
92 return * static_cast<Self*>(this)->binding_;
95 ///////////////////////////////////////////////////////////////////////////
96 // senf::ppi::EventImplementation<EventType>
98 template <class EventType>
99 prefix_ senf::ppi::module::Module & senf::ppi::EventImplementation<EventType>::module()
102 return binding_->module();
105 template <class EventType>
106 prefix_ senf::ppi::EventManager & senf::ppi::EventImplementation<EventType>::manager()
109 return binding_->manager();
112 ////////////////////////////////////////
115 template <class EventType>
116 prefix_ senf::ppi::EventImplementation<EventType>::EventImplementation()
120 ////////////////////////////////////////
123 template <class EventType>
124 prefix_ bool senf::ppi::EventImplementation<EventType>::v_isRegistered()
129 template <class EventType>
131 senf::ppi::EventImplementation<EventType>::setBinding(detail::EventBinding<Event> & binding)
133 binding_ = & binding;
136 ///////////////////////////////cti.e///////////////////////////////////////
143 // comment-column: 40
144 // c-file-style: "senf"
145 // indent-tabs-mode: nil
146 // ispell-local-dictionary: "american"
147 // compile-command: "scons -u test"