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.

199 lines
3.7 KiB

  1. //
  2. // Copyright (c) 1997-2001 Microsoft Corporation
  3. //
  4. #ifndef SIMC_STACK_VALUES_H
  5. #define SIMC_STACK_VALUES_H
  6. // The declarations for the various values passed up using the stack
  7. // of the parser. A user of the parser never needs to understand the contents
  8. // of this file.
  9. // The $$ for the DefVal clause. This is a bit of a kludge.
  10. class SIMCDefValInfo
  11. {
  12. public:
  13. char *name;
  14. SIMCSymbol **symbol;
  15. long line, column;
  16. SIMCDefValInfo(char *n, SIMCSymbol **s, long l, long c)
  17. : symbol(s), line(l), column(c)
  18. {
  19. name = NewString(n);
  20. }
  21. ~SIMCDefValInfo()
  22. {
  23. if(name)
  24. delete name;
  25. }
  26. };
  27. class SIMCIndexInfo
  28. {
  29. public:
  30. SIMCIndexList *indexList;
  31. long line, column;
  32. SIMCIndexInfo(SIMCIndexList *list, long l, long c)
  33. : indexList(list), line(l), column(c)
  34. {}
  35. };
  36. class SIMCIndexInfoV2
  37. {
  38. public:
  39. SIMCIndexListV2 *indexList;
  40. SIMCSymbol **augmentsClause;
  41. long line, column;
  42. SIMCIndexInfoV2(SIMCIndexListV2 *list, long l, long c, SIMCSymbol **augments = NULL)
  43. : indexList(list), line(l), column(c), augmentsClause(augments)
  44. {}
  45. };
  46. class SIMCNameInfo
  47. {
  48. public:
  49. char *name;
  50. long line, column;
  51. SIMCNameInfo(char *n, long l, long c)
  52. : line(l), column(c)
  53. {
  54. name = NewString(n);
  55. }
  56. virtual ~SIMCNameInfo()
  57. {
  58. delete(name);
  59. }
  60. };
  61. class SIMCNumberInfo
  62. {
  63. public:
  64. long number;
  65. BOOL isUnsigned;
  66. long line, column;
  67. SIMCNumberInfo(long n, long l, long c, BOOL u)
  68. : number(n), line(l), column(c), isUnsigned(u)
  69. {}
  70. };
  71. class SIMCHexStringInfo
  72. {
  73. public:
  74. char *value;
  75. long line, column;
  76. SIMCHexStringInfo(char *v, long l, long c)
  77. : line(l), column(c)
  78. {
  79. value = NewString(v);
  80. }
  81. virtual ~SIMCHexStringInfo()
  82. {
  83. delete(value);
  84. }
  85. };
  86. typedef SIMCHexStringInfo SIMCBinaryStringInfo;
  87. enum SIMCValueContents { NAME_INFO,
  88. NUMBER_INFO,
  89. HEX_STRING_INFO,
  90. BINARY_STRING_INFO,
  91. BIT_INFO
  92. };
  93. class SIMCValueInfo
  94. {
  95. public:
  96. enum SIMCValueContents contents;
  97. union
  98. {
  99. SIMCNameInfo *nameInfo;
  100. SIMCNumberInfo *numberInfo;
  101. SIMCHexStringInfo *hexStringInfo;
  102. SIMCBinaryStringInfo *binaryStringInfo;
  103. SIMCBitsValue *bitsValueInfo;
  104. };
  105. };
  106. class SIMCAccessInfo
  107. {
  108. public:
  109. SIMCObjectTypeV1::AccessType a;
  110. long line, column;
  111. SIMCAccessInfo(SIMCObjectTypeV1::AccessType n, long l, long c)
  112. : a(n), line(l), column(c)
  113. {}
  114. };
  115. class SIMCAccessInfoV2
  116. {
  117. public:
  118. SIMCObjectTypeV2::AccessType a;
  119. long line, column;
  120. SIMCAccessInfoV2(SIMCObjectTypeV2::AccessType n, long l, long c)
  121. : a(n), line(l), column(c)
  122. {}
  123. };
  124. class SIMCStatusInfo
  125. {
  126. public:
  127. SIMCObjectTypeV1::StatusType a;
  128. long line, column;
  129. SIMCStatusInfo(SIMCObjectTypeV1::StatusType n, long l, long c)
  130. : a(n), line(l), column(c)
  131. {}
  132. };
  133. class SIMCStatusInfoV2
  134. {
  135. public:
  136. SIMCObjectTypeV2::StatusType a;
  137. long line, column;
  138. SIMCStatusInfoV2(SIMCObjectTypeV2::StatusType n, long l, long c)
  139. : a(n), line(l), column(c)
  140. {}
  141. };
  142. class SIMCObjectIdentityStatusInfo
  143. {
  144. public:
  145. SIMCObjectIdentityType::StatusType a;
  146. long line, column;
  147. SIMCObjectIdentityStatusInfo(SIMCObjectIdentityType::StatusType n,
  148. long l, long c)
  149. : a(n), line(l), column(c)
  150. {}
  151. };
  152. class SIMCNotificationTypeStatusInfo
  153. {
  154. public:
  155. SIMCNotificationTypeType::StatusType a;
  156. long line, column;
  157. SIMCNotificationTypeStatusInfo(SIMCNotificationTypeType::StatusType n,
  158. long l, long c)
  159. : a(n), line(l), column(c)
  160. {}
  161. };
  162. class SIMCSymbolReference
  163. {
  164. public:
  165. SIMCSymbol **s;
  166. long line, column;
  167. SIMCSymbolReference(SIMCSymbol **n, long l, long c)
  168. : s(n), line(l), column(c)
  169. {}
  170. };
  171. #endif