00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef COH_XOR_FILTER_HPP
00017 #define COH_XOR_FILTER_HPP
00018
00019 #include "coherence/lang.ns"
00020
00021 #include "coherence/util/Map.hpp"
00022 #include "coherence/util/filter/ArrayFilter.hpp"
00023
00024 COH_OPEN_NAMESPACE3(coherence,util,filter)
00025
00026
00027
00028
00029
00030
00031
00032 class COH_EXPORT XorFilter
00033 : public class_spec<XorFilter,
00034 extends<ArrayFilter> >
00035 {
00036 friend class factory<XorFilter>;
00037
00038
00039
00040 protected:
00041
00042
00043
00044 XorFilter();
00045
00046
00047
00048
00049
00050
00051
00052
00053 XorFilter(Filter::View vFilterLeft, Filter::View vFilterRight);
00054
00055 private:
00056
00057
00058
00059 XorFilter(const XorFilter&);
00060
00061
00062
00063
00064 public:
00065
00066
00067
00068 virtual bool evaluateEntry(Map::Entry::View vEntry) const;
00069
00070
00071
00072
00073 public:
00074
00075
00076
00077 virtual bool evaluate(Object::View v) const;
00078
00079
00080
00081
00082 public:
00083
00084
00085
00086 virtual size32_t calculateEffectiveness(Map::View vMapIndexes,
00087 Set::View vSetKeys) const;
00088
00089
00090
00091
00092 virtual Filter::View applyIndex(Map::View vMapIndexes,
00093 Set::Handle hSetKeys) const;
00094 };
00095
00096 COH_CLOSE_NAMESPACE3
00097
00098 #endif // COH_XOR_FILTER_HPP