home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 May / PCFMay2001.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / qrycodes.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  9.8 KB  |  285 lines

  1. // *************************************************************************
  2. //
  3. //  File: QRYCODES.H
  4. //
  5. //  Copyright (c) 1994, 1995 Microsoft Corp.
  6. //
  7. //
  8. //
  9. //  This file contains the Query operator manifests for queries against
  10. //  machines. This is part of the SMS SDK.
  11. //
  12. //
  13. //  History:
  14. //      JonShu      01-April-1994       Created.
  15. //                                      This was extracted from query.h
  16. //
  17. // *************************************************************************
  18.  
  19. #ifndef _QUERYCODES_H_
  20. #pragma option push -b -a8 -pc -A- /*P_O_Push*/
  21. #define _QUERYCODES_H_
  22.  
  23. // Query Operators.
  24. // ================
  25.  
  26. #define QOP_NOOP                0
  27.  
  28. #define QOP_BOOL_EQ             1
  29. #define QOP_BOOL_NEQ            2
  30. #define QOP_BOOL_FIRST          QOP_BOOL_EQ
  31. #define QOP_BOOL_LAST           QOP_BOOL_NEQ
  32.  
  33. #define QOP_NUMERIC_EQ          3
  34. #define QOP_NUMERIC_NEQ         4
  35. #define QOP_NUMERIC_GT          5
  36. #define QOP_NUMERIC_LT          6
  37. #define QOP_NUMERIC_GTE         7
  38. #define QOP_NUMERIC_LTE         8
  39. #define QOP_NUMERIC_FIRST       QOP_NUMERIC_EQ
  40. #define QOP_NUMERIC_LAST        QOP_NUMERIC_LTE
  41.  
  42. #define QOP_STR_EQ              9
  43. #define QOP_STR_NEQ             10
  44. #define QOP_STR_GT              11
  45. #define QOP_STR_LT              12
  46. #define QOP_STR_GTE             13
  47. #define QOP_STR_LTE             14
  48. #define QOP_STR_LIKE            15
  49. #define QOP_STR_NOTLIKE         16
  50. #define QOP_STR_FIRST           QOP_STR_EQ
  51. #define QOP_STR_LAST            QOP_STR_NOTLIKE
  52.  
  53. #define QOP_UPCASE_EQ           17
  54. #define QOP_UPCASE_NEQ          18
  55. #define QOP_UPCASE_GT           19
  56. #define QOP_UPCASE_LT           20
  57. #define QOP_UPCASE_GTE          21
  58. #define QOP_UPCASE_LTE          22
  59. #define QOP_UPCASE_LIKE         23
  60. #define QOP_UPCASE_NOTLIKE      24
  61. #define QOP_UPCASE_FIRST        QOP_UPCASE_EQ
  62. #define QOP_UPCASE_LAST         QOP_UPCASE_NOTLIKE
  63.  
  64. #define QOP_DATETIME_EQ         25
  65. #define QOP_DATETIME_NEQ        26
  66. #define QOP_DATETIME_GT         27
  67. #define QOP_DATETIME_LT         28
  68. #define QOP_DATETIME_GTE        29
  69. #define QOP_DATETIME_LTE        30
  70. #define QOP_DATETIME_FIRST      QOP_DATETIME_EQ
  71. #define QOP_DATETIME_LAST       QOP_DATETIME_LTE
  72.  
  73. #define QOP_DATE_EQ             31
  74. #define QOP_DATE_NEQ            32
  75. #define QOP_DATE_GT             33
  76. #define QOP_DATE_LT             34
  77. #define QOP_DATE_GTE            35
  78. #define QOP_DATE_LTE            36
  79. #define QOP_DATE_FIRST          QOP_DATE_EQ
  80. #define QOP_DATE_LAST           QOP_DATE_LTE
  81.  
  82. #define QOP_TIME_EQ             37
  83. #define QOP_TIME_NEQ            38
  84. #define QOP_TIME_GT             39
  85. #define QOP_TIME_LT             40
  86. #define QOP_TIME_GTE            41
  87. #define QOP_TIME_LTE            42
  88. #define QOP_TIME_FIRST          QOP_TIME_EQ
  89. #define QOP_TIME_LAST           QOP_TIME_LTE
  90.  
  91. #define QOP_YEAR_EQ             43
  92. #define QOP_YEAR_NEQ            44
  93. #define QOP_YEAR_GT             45
  94. #define QOP_YEAR_LT             46
  95. #define QOP_YEAR_GTE            47
  96. #define QOP_YEAR_LTE            48
  97. #define QOP_YEAR_FIRST          QOP_YEAR_EQ
  98. #define QOP_YEAR_LAST           QOP_YEAR_LTE
  99.  
  100. #define QOP_MONTH_EQ            49
  101. #define QOP_MONTH_NEQ           50
  102. #define QOP_MONTH_GT            51
  103. #define QOP_MONTH_LT            52
  104. #define QOP_MONTH_GTE           53
  105. #define QOP_MONTH_LTE           54
  106. #define QOP_MONTH_FIRST         QOP_MONTH_EQ
  107. #define QOP_MONTH_LAST          QOP_MONTH_LTE
  108.  
  109. #define QOP_DAY_EQ              55
  110. #define QOP_DAY_NEQ             56
  111. #define QOP_DAY_GT              57
  112. #define QOP_DAY_LT              58
  113. #define QOP_DAY_GTE             59
  114. #define QOP_DAY_LTE             60
  115. #define QOP_DAY_FIRST           QOP_DAY_EQ
  116. #define QOP_DAY_LAST            QOP_DAY_LTE
  117.  
  118. #define QOP_HOUR_EQ             61
  119. #define QOP_HOUR_NEQ            62
  120. #define QOP_HOUR_GT             63
  121. #define QOP_HOUR_LT             64
  122. #define QOP_HOUR_GTE            65
  123. #define QOP_HOUR_LTE            66
  124. #define QOP_HOUR_FIRST          QOP_HOUR_EQ
  125. #define QOP_HOUR_LAST           QOP_HOUR_LTE
  126.  
  127. #define QOP_MINUTE_EQ           67
  128. #define QOP_MINUTE_NEQ          68
  129. #define QOP_MINUTE_GT           69
  130. #define QOP_MINUTE_LT           70
  131. #define QOP_MINUTE_GTE          71
  132. #define QOP_MINUTE_LTE          72
  133. #define QOP_MINUTE_FIRST        QOP_MINUTE_EQ
  134. #define QOP_MINUTE_LAST         QOP_MINUTE_LTE
  135.  
  136. #define QOP_SECOND_EQ           73
  137. #define QOP_SECOND_NEQ          74
  138. #define QOP_SECOND_GT           75
  139. #define QOP_SECOND_LT           76
  140. #define QOP_SECOND_GTE          77
  141. #define QOP_SECOND_LTE          78
  142. #define QOP_SECOND_FIRST        QOP_SECOND_EQ
  143. #define QOP_SECOND_LAST         QOP_SECOND_LTE
  144.  
  145. #define QOP_LAST                QOP_SECOND_LAST
  146.  
  147.  
  148. //***************************************************************************
  149. // OPERATOR STRING TABLE.
  150. //
  151. // The sequence of the operators in this array is identical to the
  152. // sequence of of the QOP_ symbols in QUERYTOK.H.  If the order of one
  153. // is changed, the order of the other must be changed to match.
  154. // Eventually, this table will be replaced with a string table resource
  155. // of some kind.   See CQueryToken::OperatorToString().
  156. //
  157. //***************************************************************************
  158. static char *OpName[] = {
  159.     /* QOP_NOOP */              "<none>",
  160.  
  161.     /* BOOL operators */
  162.  
  163.     /* QOP_BOOL_EQ,  */         "is (boolean)",
  164.     /* QOP_BOOL_NEQ, */         "is not (boolean)",
  165.  
  166.     /* NUMERIC operators */
  167.  
  168.     /* QOP_NUMERIC_EQ,  */      "is equal to",
  169.     /* QOP_NUMERIC_NEQ, */      "is not equal to",
  170.     /* QOP_NUMERIC_GT,  */      "is greater than",
  171.     /* QOP_NUMERIC_LT,  */      "is less than",
  172.     /* QOP_NUMERIC_GTE, */      "is greater than or equal to",
  173.     /* QOP_NUMERIC_LTE, */      "is less than or equal to",
  174.  
  175.     /* Case-sensitive string operators */
  176.  
  177.     /* QOP_STR_EQ      */       "is",
  178.     /* QOP_STR_NEQ     */       "is not",
  179.     /* QOP_STR_GT      */       "comes after",
  180.     /* QOP_STR_LT      */       "comes before",
  181.     /* QOP_STR_GTE     */       "is same as or comes after",
  182.     /* QOP_STR_LTE     */       "is same as or comes before",
  183.     /* QOP_STR_LIKE    */       "is like",
  184.     /* QOP_STR_NOTLIKE */       "is not like",
  185.  
  186.     /* Upper-case-evaluation string operators */
  187.  
  188.     /* QOP_UPCASE_EQ,     */    "is (upper case)",
  189.     /* QOP_UPCASE_NEQ,    */    "is not (upper case)",
  190.     /* QOP_UPCASE_GT,     */    "comes after (upper case)",
  191.     /* QOP_UPCASE_LT,     */    "comes before (upper case)",
  192.     /* QOP_UPCASE_GTE,    */    "is same as or comes after (upper case)",
  193.     /* QOP_UPCASE_LTE,    */    "is same as or comes before (upper case)",
  194.     /* QOP_UPCASE_LIKE,   */    "is like (upper case)",
  195.     /* QOP_UPCASE_NOTLIKE */    "is not like (upper case)",
  196.  
  197.     /* Date-Time operators */
  198.  
  199.     /* QOP_DATETIME_EQ,  */     "date/time is",
  200.     /* QOP_DATETIME_NEQ, */     "date/time is not",
  201.     /* QOP_DATETIME_GT,  */     "date/time is after",
  202.     /* QOP_DATETIME_LT,  */     "date/time is before",
  203.     /* QOP_DATETIME_GTE, */     "date/time is on or after",
  204.     /* QOP_DATETIME_LTE, */     "date/time is on or before",
  205.  
  206.     /* Date operators */
  207.  
  208.     /* QOP_DATE_EQ,  */         "date is",
  209.     /* QOP_DATE_NEQ, */         "date is not",
  210.     /* QOP_DATE_GT,  */         "date is after",
  211.     /* QOP_DATE_LT,  */         "date is before",
  212.     /* QOP_DATE_GTE, */         "date is on or after",
  213.     /* QOP_DATE_LTE, */         "date is on or before",
  214.  
  215.     /* Time operators */
  216.  
  217.     /* QOP_TIME_EQ,  */         "time is",
  218.     /* QOP_TIME_NEQ, */         "time is not",
  219.     /* QOP_TIME_GT,  */         "time is after",
  220.     /* QOP_TIME_LT,  */         "time is before",
  221.     /* QOP_TIME_GTE, */         "time is at or after",
  222.     /* QOP_TIME_LTE, */         "time is at or before",
  223.  
  224.     /* Year operators */
  225.  
  226.     /* QOP_YEAR_EQ,  */         "year is",
  227.     /* QOP_YEAR_NEQ, */         "year is not",
  228.     /* QOP_YEAR_GT,  */         "year is after",
  229.     /* QOP_YEAR_LT,  */         "year is before",
  230.     /* QOP_YEAR_GTE, */         "year is on or after",
  231.     /* QOP_YEAR_LTE, */         "year is on or before",
  232.  
  233.     /* Month operators */
  234.  
  235.     /* QOP_MONTH_EQ  */         "month is",
  236.     /* QOP_MONTH_NEQ */         "month is not",
  237.     /* QOP_MONTH_GT  */         "month is after",
  238.     /* QOP_MONTH_LT  */         "month is before",
  239.     /* QOP_MONTH_GTE */         "month is on or after",
  240.     /* QOP_MONTH_LTE */         "month is on or before",
  241.  
  242.     /* Day operators */
  243.  
  244.     /* QOP_DAY_EQ,  */          "day is",
  245.     /* QOP_DAY_NEQ, */          "day is not",
  246.     /* QOP_DAY_GT,  */          "day is after",
  247.     /* QOP_DAY_LT,  */          "day is before",
  248.     /* QOP_DAY_GTE, */          "day is on or after",
  249.     /* QOP_DAY_LTE, */          "day is on or before",
  250.  
  251.     /* Hour operators */
  252.  
  253.     /* QOP_HOUR_EQ,  */         "hour is",
  254.     /* QOP_HOUR_NEQ, */         "hour is not",
  255.     /* QOP_HOUR_GT,  */         "hour is after",
  256.     /* QOP_HOUR_LT,  */         "hour is before",
  257.     /* QOP_HOUR_GTE, */         "hour is at or after",
  258.     /* QOP_HOUR_LTE, */         "hour is at or before",
  259.  
  260.     /* Minute operators */
  261.  
  262.     /* QOP_MINUTE_EQ,  */       "minute is",
  263.     /* QOP_MINUTE_NEQ, */       "minute is not",
  264.     /* QOP_MINUTE_GT,  */       "minute is after",
  265.     /* QOP_MINUTE_LT,  */       "minute is before",
  266.     /* QOP_MINUTE_GTE, */       "minute is at or after",
  267.     /* QOP_MINUTE_LTE, */       "minute is at or before",
  268.  
  269.     /* Second operators */
  270.  
  271.     /* QOP_SECOND_EQ,  */       "second is",
  272.     /* QOP_SECOND_NEQ, */       "second is not",
  273.     /* QOP_SECOND_GT,  */       "second is after",
  274.     /* QOP_SECOND_LT,  */       "second is before",
  275.     /* QOP_SECOND_GTE, */       "second is at or after",
  276.     /* QOP_SECOND_LTE, */       "second is at or before"
  277. };
  278.  
  279. #pragma option pop /*P_O_Pop*/
  280. #endif  // _QUERYCODES_H_
  281.  
  282.  
  283. /* EOF: qrycodes.h */
  284.  
  285.