X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=PPI%2FEventManager.hh;h=20535a03649f687184c445ff3f2d19175404fc1b;hb=fd3a0e8ac95d1158e9ea661ddf9187b67c70169f;hp=2df295f8d882af3c9a168c0930d58bb4146770c4;hpb=3d16600678b948ff3bd0e4fd2a1a800fcc629a03;p=senf.git diff --git a/PPI/EventManager.hh b/PPI/EventManager.hh index 2df295f..20535a0 100644 --- a/PPI/EventManager.hh +++ b/PPI/EventManager.hh @@ -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 @@ -23,12 +23,12 @@ /** \file \brief EventManager public header */ -#ifndef HH_EventManager_ -#define HH_EventManager_ 1 +#ifndef HH_SENF_PPI_EventManager_ +#define HH_SENF_PPI_EventManager_ 1 // Custom includes #include -#include "Scheduler/ClockService.hh" +#include "../Scheduler/ClockService.hh" #include "predecl.hh" #include "detail/Callback.hh" #include "detail/EventBinding.hh" @@ -39,7 +39,11 @@ namespace senf { namespace ppi { - /** \brief + /** \brief Event registry and control + + The EventManager control event registration and manages global event parameters. The + EventManager controls event dispatch but does \e not control event generation. This is the + responsibility of an external component (the Scheduler) */ class EventManager { @@ -47,16 +51,13 @@ namespace ppi { /////////////////////////////////////////////////////////////////////////// // Types - template #ifndef DOXYGEN + // Somehow doxygen barfs on this definition + template struct Callback -#else - // This is SO stupid but doxygen must have some scoping problems if the - // struct is called 'Callback' and will hang in an endless loop somewhere - struct Callback_ -#endif : public detail::Callback {}; +#endif /////////////////////////////////////////////////////////////////////////// ///\name Structors and default members @@ -74,17 +75,17 @@ namespace ppi { ///@} /////////////////////////////////////////////////////////////////////////// + ClockService::clock_type now(); ///< Current time at last event dispatch + ClockService::clock_type time(); ///< Expected time of the last event + + protected: + + private: template void registerEvent(module::Module & module, typename Callback::type callback, Descriptor & descriptor); - ClockService::clock_type now(); - ClockService::clock_type time(); - - protected: - - private: void destroyModule(module::Module & module); typedef boost::ptr_vector EventRegistrations;