00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef WIFI_FRAME_FILTER_REFERENCE_BLACKLIST_HH_
00023 # define WIFI_FRAME_FILTER_REFERENCE_BLACKLIST_HH_
00024
00025 # include <set>
00026
00027 # include <wipal/tool/filter.hh>
00028
00029
00030
00031
00032
00033 namespace wifi
00034 {
00035 namespace frame
00036 {
00037 namespace filter
00038 {
00039
00040 namespace internals
00041 {
00042 struct blacklist_predicate;
00043 }
00044
00045 template <class, class>
00046 struct reference_blacklist;
00047
00048 }
00049 }
00050 }
00051
00052
00053
00054
00055
00056 namespace tool
00057 {
00058
00059 #define wp_wff wifi::frame::filter
00060 #define wp_wffi wp_wff::internals
00061
00062 template <class I, class B>
00063 struct types< wp_wff::reference_blacklist<I, B> >:
00064 public types< tool::filter<I, wp_wffi::blacklist_predicate,
00065 wp_get_exact(B,
00066 wp_wff::reference_blacklist<I,
00067 B>)> >
00068 {
00069 };
00070
00071 #undef wp_wff
00072 #undef wp_wffi
00073
00074 }
00075
00076
00077
00078
00079
00080
00081
00082 namespace wifi
00083 {
00084 namespace frame
00085 {
00086 namespace filter
00087 {
00088
00089 namespace internals
00090 {
00091
00092 struct blacklist_predicate
00093 {
00094 typedef std::pair<unsigned, unsigned> blacklist_item;
00095 typedef std::set<blacklist_item> blacklist;
00096
00097 blacklist_predicate(const blacklist& l);
00098
00099 template <class T>
00100 bool
00101 operator () (const T& item) const;
00102
00103 private:
00104 blacklist blacklist_;
00105 };
00106
00107 }
00108
00109 template <class InputIterator, class B = tool::bottom>
00110 struct reference_blacklist:
00111 public tool::filter<InputIterator, internals::blacklist_predicate,
00112 wp_get_exact(B,
00113 reference_blacklist<InputIterator, B>)>
00114 {
00115 typedef
00116 tool::filter<InputIterator, internals::blacklist_predicate,
00117 wp_get_exact(B, reference_blacklist<InputIterator, B>)>
00118 super_type;
00119 typedef std::set< std::pair<unsigned, unsigned> > blacklist;
00120
00121 reference_blacklist(const InputIterator& first,
00122 const InputIterator& last,
00123 const blacklist& l);
00124 };
00125
00126 }
00127
00128 }
00129
00130 }
00131
00132 # include "reference_blacklist.hxx"
00133
00134 #endif // ! WIFI_FRAME_FILTER_SIMPLE_MERGE_HH_