X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=PPI%2FEvents.cti;h=428e2cdea4dc8e6cc00b9e423e556d4802ca02ce;hb=48bbf27e9e89d6eba4754fba65d70a15b115ac8b;hp=a7db87cbd02c41cb8d16fb2e53b1f46f5ba3e57d;hpb=81ffa1c459b96dd44472bcef37e1e373934ee138;p=senf.git diff --git a/PPI/Events.cti b/PPI/Events.cti index a7db87c..428e2cd 100644 --- a/PPI/Events.cti +++ b/PPI/Events.cti @@ -32,34 +32,80 @@ ///////////////////////////////cti.p/////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// -// senf::ppi::EventImplementation +// senf::ppi::EventImplementationHelper //////////////////////////////////////// // protected members -template -prefix_ senf::ppi::EventImplementation::EventImplementation() - : binding_(0) -{} +template +prefix_ void +senf::ppi::EventImplementationHelper::callback(EventArg event, + boost::posix_time::ptime time) +{ + binding().callback(event,time); +} -template -prefix_ void senf::ppi::EventImplementation::callback(EventArg event, - boost::posix_time::ptime time) +template +prefix_ void senf::ppi::EventImplementationHelper::callback(EventArg event) { - BOOST_ASSERT(binding_); - binding_->callback(event,time); + binding().callback(event); } -template -prefix_ void senf::ppi::EventImplementation::callback(EventArg event) +//////////////////////////////////////// +// private members + +template +prefix_ senf::ppi::detail::EventBinding & +senf::ppi::EventImplementationHelper::binding() +{ + BOOST_ASSERT( static_cast(this)->binding_ ); + return * static_cast(this)->binding_; +} + +/////////////////////////////////////////////////////////////////////////// +// senf::ppi::EventImplementationHelper + +//////////////////////////////////////// +// protected members + +template +prefix_ void +senf::ppi::EventImplementationHelper::callback(boost::posix_time::ptime time) +{ + binding().callback(time); +} + +template +prefix_ void senf::ppi::EventImplementationHelper::callback() { - BOOST_ASSERT(binding_); - binding_->callback(event); + binding().callback(); } //////////////////////////////////////// // private members +template +prefix_ senf::ppi::detail::EventBinding & +senf::ppi::EventImplementationHelper::binding() +{ + BOOST_ASSERT( static_cast(this)->binding_ ); + return * static_cast(this)->binding_; +} + +/////////////////////////////////////////////////////////////////////////// +// senf::ppi::EventImplementation + +//////////////////////////////////////// +// protected members + +template +prefix_ senf::ppi::EventImplementation::EventImplementation() + : binding_(0) +{} + +//////////////////////////////////////// +// private members + template prefix_ bool senf::ppi::EventImplementation::v_isRegistered() {