X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2Fmoof%2Fdispatcher.hh;h=7a1a08109a65ec441ea42127fe54ef2572e7a505;hp=a4207c42170bffd68ee1a48713e857b9430c911b;hb=HEAD;hpb=831f04d4bc19a390415ac0bbac4331c7a65509bc diff --git a/src/moof/dispatcher.hh b/src/moof/dispatcher.hh index a4207c4..7a1a081 100644 --- a/src/moof/dispatcher.hh +++ b/src/moof/dispatcher.hh @@ -1,22 +1,15 @@ -/*] Copyright (c) 2009-2010, Charles McGarvey [************************** +/*] Copyright (c) 2009-2011, Charles McGarvey [***************************** **] All rights reserved. * -* vi:ts=4 sw=4 tw=75 -* * Distributable under the terms and conditions of the 2-clause BSD license; * see the file COPYING for a complete text of the license. * -**************************************************************************/ +*****************************************************************************/ #ifndef _MOOF_DISPATCH_HH_ #define _MOOF_DISPATCH_HH_ -/** - * \file dispatcher.hh - * Classes that deal with message dispatching. - */ - #include #include @@ -25,13 +18,17 @@ #include +/** + * \file dispatcher.hh + * Classes that deal with message dispatching. + */ + namespace moof { /** * Dispatcher of messages to interested parties. */ - class dispatcher { class impl; @@ -39,7 +36,6 @@ class dispatcher void remove_target(unsigned id); - public: class handle @@ -84,17 +80,16 @@ public: private: boost::weak_ptr dispatcher_; - mutable unsigned id_; + mutable unsigned id_; }; typedef boost::function function; - dispatcher(); handle add_target(const std::string& event, const function& callback); handle add_target(const std::string& event, const function& callback, - handle handle); + handle handle); void dispatch(const std::string& event);