Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.4 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. // File: operator.h
  4. // Copyright (C) 1994-1997 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. //
  8. //
  9. //-----------------------------------------------------------------------------
  10. #pragma once
  11. typedef UINT Operators;
  12. class LTAPIENTRY CColumnOp
  13. {
  14. public:
  15. enum Operator
  16. {
  17. None = 0,
  18. EQ = 0x00000001,
  19. NOTEQ = 0x00000002,
  20. GT = 0x00000004,
  21. LT = 0x00000008,
  22. LTEQ = 0x00000010,
  23. GTEQ = 0x00000020,
  24. WITHIN = 0x00000040,
  25. BEYOND = 0x00000080,
  26. CONTAINS = 0x00000100,
  27. CONTAINSWORD = 0x00000200,
  28. STARTWITH = 0x00000400,
  29. ENDWITH = 0x00000800,
  30. };
  31. typedef CList<Operator, Operator> COperatorList;
  32. static CLString GetText(Operator);
  33. static void GetOperators(const Operators, COperatorList &);
  34. private:
  35. CColumnOp();
  36. };
  37. typedef CColumnOp CCO;
  38. const Operators NoOps = 0;
  39. const Operators NumericOps = CCO::EQ | CCO::NOTEQ | CCO::GT | CCO::LT;
  40. const Operators SimpStrOps = CCO::EQ | CCO::NOTEQ | CCO::STARTWITH | CCO::ENDWITH;
  41. const Operators CompStrOps = CCO::CONTAINS | CCO::CONTAINSWORD;
  42. const Operators StringOps = SimpStrOps | CompStrOps;
  43. const Operators StrListOps = CCO::EQ | CCO::NOTEQ;
  44. const Operators DateOps = CCO::LT | CCO::GT | CCO::EQ | CCO::NOTEQ | CCO::WITHIN | CCO::BEYOND;
  45. const Operators BooleanOps = CCO::EQ | CCO::NOTEQ;