00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef ycpless_h
00023 #define ycpless_h
00024
00025 #include "YCPValue.h"
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 class ycp_less : public std::binary_function<YCPValue, YCPValue, bool>
00036 {
00037
00038 public:
00039
00040 ycp_less(bool respect_locale = false) : respect_locale(respect_locale) {}
00041
00042 bool operator()(const YCPValue& x, const YCPValue& y) const
00043 {
00044 return x->compare(y, respect_locale) == YO_LESS;
00045 }
00046
00047 private:
00048
00049 const bool respect_locale;
00050
00051 };
00052
00053
00054
00055
00056
00057
00058
00059
00060 class ycp_equal_to : public std::binary_function<YCPValue, YCPValue, bool>
00061 {
00062
00063 public:
00064
00065 ycp_equal_to(bool respect_locale = false) : respect_locale(respect_locale) {}
00066
00067 bool operator()(const YCPValue& x, const YCPValue& y) const
00068 {
00069 return x->compare(y, respect_locale) == YO_EQUAL;
00070 }
00071
00072 private:
00073
00074 const bool respect_locale;
00075
00076 };
00077
00078
00079
00080
00081
00082
00083
00084
00085 class ycp_not_equal_to : public std::binary_function<YCPValue, YCPValue, bool>
00086 {
00087
00088 public:
00089
00090 ycp_not_equal_to(bool respect_locale = false) : respect_locale(respect_locale) {}
00091
00092 bool operator()(const YCPValue& x, const YCPValue& y) const
00093 {
00094 return x->compare(y, respect_locale) != YO_EQUAL;
00095 }
00096
00097 private:
00098
00099 const bool respect_locale;
00100
00101 };
00102
00103
00104 #endif // ycpless_h