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