User Manual, Developers Guide and API Documentation

ConnectionRule.hpp

Go to the documentation of this file.
00001 /*******************************************************************************
00002  * This file is part of openWNS (open Wireless Network Simulator)
00003  * _____________________________________________________________________________
00004  *
00005  * Copyright (C) 2004-2009
00006  * Chair of Communication Networks (ComNets)
00007  * Kopernikusstr. 5, D-52074 Aachen, Germany
00008  * email: info@openwns.org
00009  * www: http://www.openwns.org
00010  * _____________________________________________________________________________
00011  *
00012  * openWNS is free software; you can redistribute it and/or modify it under the
00013  * terms of the GNU Lesser General Public License version 2 as published by the
00014  * Free Software Foundation;
00015  *
00016  * openWNS is distributed in the hope that it will be useful, but WITHOUT ANY
00017  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
00018  * A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00019  * details.
00020  *
00021  * You should have received a copy of the GNU Lesser General Public License
00022  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00023  *
00024  ******************************************************************************/
00025 
00026 #ifndef WIMAC_CONNECTION_RULE
00027 #define WIMAC_CONNECTION_RULE
00028 
00029 #include <WNS/ldk/Compound.hpp>
00030 #include <WNS/ldk/ldk.hpp>
00031 #include <WNS/service/dll/Address.hpp>
00032 #include <WNS/Cloneable.hpp>
00033 
00034 namespace wimac {
00035     class UpperConvergence;
00036 
00040     class ConnectionRule :
00041         public virtual wns::CloneableInterface
00042     {
00043     public:
00044         virtual ~ConnectionRule() {}
00045 
00046         virtual bool match( const wns::ldk::CompoundPtr& compound ) = 0;
00047     };
00048 
00052     class DestinationIPRule :
00053         public ConnectionRule,
00054         public wns::Cloneable<DestinationIPRule>
00055     {
00056     public:
00057         DestinationIPRule( wns::service::dll::UnicastAddress destination,
00058                            UpperConvergence* upperC  );
00059 
00060         virtual bool match( const wns::ldk::CompoundPtr& compound );
00061     private:
00062         wns::service::dll::UnicastAddress address_;
00063         UpperConvergence* upperConvergence_;
00064     };
00065 
00069     class MatchAllRule :
00070         public ConnectionRule,
00071         public wns::Cloneable<MatchAllRule>
00072     {
00073         virtual bool match( const wns::ldk::CompoundPtr& )
00074         {
00075             return true;
00076         }
00077     };
00078 }
00079 
00080 #endif
00081 

Generated on Tue May 22 03:32:09 2012 for openWNS by  doxygen 1.5.5