X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=PPI%2FEvents.cti;h=435fe3a34638acd5d0bd83c9b853401d15199f87;hb=b89e3166f7680755683dccee5e48cb3a820185c0;hp=428e2cdea4dc8e6cc00b9e423e556d4802ca02ce;hpb=7465ea4f6d3d54622bd783106cf8b60d5f133343;p=senf.git diff --git a/PPI/Events.cti b/PPI/Events.cti index 428e2cd..435fe3a 100644 --- a/PPI/Events.cti +++ b/PPI/Events.cti @@ -1,8 +1,8 @@ // $Id$ // -// Copyright (C) 2007 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum fuer Satelitenkommunikation (SatCom) +// Copyright (C) 2007 +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY // Stefan Bund // // This program is free software; you can redistribute it and/or modify @@ -26,6 +26,7 @@ #include "Events.ih" // Custom includes +#include "../Utils/senfassert.hh" #include "detail/EventBinding.hh" #define prefix_ inline @@ -40,7 +41,7 @@ template prefix_ void senf::ppi::EventImplementationHelper::callback(EventArg event, - boost::posix_time::ptime time) + ClockService::clock_type time) { binding().callback(event,time); } @@ -58,7 +59,8 @@ template prefix_ senf::ppi::detail::EventBinding & senf::ppi::EventImplementationHelper::binding() { - BOOST_ASSERT( static_cast(this)->binding_ ); + SENF_ASSERT( static_cast(this)->binding_ && + "senf::ppi::EventImplementationHelper::binding(): Missing registerEvent()" ); return * static_cast(this)->binding_; } @@ -70,7 +72,7 @@ senf::ppi::EventImplementationHelper::binding() template prefix_ void -senf::ppi::EventImplementationHelper::callback(boost::posix_time::ptime time) +senf::ppi::EventImplementationHelper::callback(ClockService::clock_type time) { binding().callback(time); } @@ -88,13 +90,28 @@ template prefix_ senf::ppi::detail::EventBinding & senf::ppi::EventImplementationHelper::binding() { - BOOST_ASSERT( static_cast(this)->binding_ ); + SENF_ASSERT( static_cast(this)->binding_ && + "senf::ppi::EventImplementationHelper::binding(): Missing registerEvent()" ); return * static_cast(this)->binding_; } /////////////////////////////////////////////////////////////////////////// // senf::ppi::EventImplementation +template +prefix_ senf::ppi::module::Module & senf::ppi::EventImplementation::module() + const +{ + return binding_->module(); +} + +template +prefix_ senf::ppi::EventManager & senf::ppi::EventImplementation::manager() + const +{ + return binding_->manager(); +} + //////////////////////////////////////// // protected members