include/wipal/wifi/frame/filter/reference_blacklist.hxx

00001 /*
00002  * WiPal - A library and a set of tools to manipulate wireless traces.
00003  * Copyright (C) 2007  Universite Pierre et Marie Curie - Paris 6
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
00018  * MA  02110-1301  USA
00019  *
00020  * Author: Thomas Claveirole <thomas.claveirole@lip6.fr>
00021  */
00022 #ifndef WIFI_FRAME_FILTER_REFERENCE_BLACKLIST_HXX_
00023 # define WIFI_FRAME_FILTER_REFERENCE_BLACKLIST_HXX_
00024 
00025 # include "reference_blacklist.hxx"
00026 
00027 namespace wifi
00028 {
00029   namespace frame
00030   {
00031     namespace filter
00032     {
00033 
00034       namespace internals
00035       {
00036 
00037         inline
00038         blacklist_predicate::blacklist_predicate(const blacklist& l):
00039           blacklist_ (l)
00040         {
00041         }
00042 
00043         template <class T>
00044         bool
00045         blacklist_predicate::operator () (const T& item) const
00046         {
00047           const blacklist_item  i (item.first.frame_id(),
00048                                    item.second.frame_id());
00049 
00050           return blacklist_.find(i) == blacklist_.end();
00051         }
00052 
00053       } // End of namespace wifi::frame::filter::internals.
00054 
00055       template <class I, class B>
00056       reference_blacklist<I, B>::reference_blacklist(const I&           first,
00057                                                      const I&           last,
00058                                                      const blacklist&   l):
00059         super_type (first, last, l)
00060       {
00061       }
00062 
00063     } // End of namespace wifi::frame::filter.
00064 
00065   } // End of namespace wifi::frame.
00066 
00067 } // End of namespace wifi.
00068 
00069 #endif // ! WIFI_FRAME_FILTER_SIMPLE_MERGE_HXX_

Generated on Wed Jan 16 16:15:14 2008 for wipal by  doxygen 1.5.4