platform/reactors/FilterReactor.hpp

00001 // ------------------------------------------------------------------------
00002 // Pion is a development platform for building Reactors that process Events
00003 // ------------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Pion is free software: you can redistribute it and/or modify it under the
00007 // terms of the GNU Affero General Public License as published by the Free
00008 // Software Foundation, either version 3 of the License, or (at your option)
00009 // any later version.
00010 //
00011 // Pion is distributed in the hope that it will be useful, but WITHOUT ANY
00012 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00013 // FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for
00014 // more details.
00015 //
00016 // You should have received a copy of the GNU Affero General Public License
00017 // along with Pion.  If not, see <http://www.gnu.org/licenses/>.
00018 //
00019 
00020 #ifndef __PION_FILTERREACTOR_HEADER__
00021 #define __PION_FILTERREACTOR_HEADER__
00022 
00023 #include <vector>
00024 #include <pion/PionConfig.hpp>
00025 #include <pion/platform/Reactor.hpp>
00026 #include <pion/platform/RuleChain.hpp>
00027 
00028 
00029 namespace pion {        // begin namespace pion
00030 namespace plugins {     // begin namespace plugins
00031 
00032 
00036 class FilterReactor :
00037     public pion::platform::Reactor
00038 {
00039 public: 
00040     
00042     FilterReactor(void) : Reactor(TYPE_PROCESSING) {}
00043     
00045     virtual ~FilterReactor() { stop(); }
00046     
00054     virtual void setConfig(const pion::platform::Vocabulary& v, const xmlNodePtr config_ptr);
00055     
00062     virtual void updateVocabulary(const pion::platform::Vocabulary& v);
00063     
00071     virtual void process(const pion::platform::EventPtr& e);
00072     
00073     
00074 private:
00075     
00077     pion::platform::RuleChain       m_rules;
00078 };
00079 
00080 
00081 }   // end namespace plugins
00082 }   // end namespace pion
00083 
00084 #endif

Generated on Wed Apr 13 16:38:34 2011 for pion-platform by  doxygen 1.4.7