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.

139 lines
2.6 KiB

  1. //
  2. // Copyright (c) 1997-2001 Microsoft Corporation, All Rights Reserved
  3. //
  4. #ifndef OBJECT_IDENTITY
  5. #define OBJECT_IDENTITY
  6. /*
  7. * This class models the OBJECT-IDENTITY macro
  8. */
  9. class SIMCObjectIdentityType : public SIMCType
  10. {
  11. public:
  12. // Symbols for the STATUS clause
  13. enum StatusType
  14. {
  15. STATUS_INVALID, // Not used,
  16. STATUS_CURRENT,
  17. STATUS_DEPRECATED,
  18. STATUS_OBSOLETE
  19. };
  20. private:
  21. // Various clauses of the OBJECT-IDENTITY macro
  22. StatusType _status;
  23. long _statusLine, _statusColumn;
  24. char *_description;
  25. long _descriptionLine, _descriptionColumn;
  26. char *_reference;
  27. long _referenceLine, _referenceColumn;
  28. public:
  29. SIMCObjectIdentityType( StatusType status,
  30. long statusLine, long statusColumn,
  31. char *description,
  32. long descriptionLine, long descriptionColumn,
  33. char *reference,
  34. long referenceLine, long referenceColumn);
  35. virtual ~SIMCObjectIdentityType();
  36. /*
  37. *
  38. * And a whole lotta functions to set/get the various clauses
  39. *
  40. */
  41. void SetStatus(StatusType s)
  42. {
  43. _status = s;
  44. }
  45. StatusType GetStatus() const
  46. {
  47. return _status;
  48. }
  49. static StatusType StringToStatusType (const char * const s);
  50. long GetStatusLine() const
  51. {
  52. return _statusLine;
  53. }
  54. void SetStatusLine(long x)
  55. {
  56. _statusLine = x;
  57. }
  58. long GetStatusColumn() const
  59. {
  60. return _statusColumn;
  61. }
  62. void SetStatusColumn(long x)
  63. {
  64. _statusColumn = x;
  65. }
  66. void SetDescription( const char * const s)
  67. {
  68. if( _description)
  69. delete [] _description;
  70. _description = NewString(s);
  71. }
  72. const char * GetDescription() const
  73. {
  74. return _description;
  75. }
  76. long GetDescriptionLine() const
  77. {
  78. return _descriptionLine;
  79. }
  80. long GetDescriptionColumn() const
  81. {
  82. return _descriptionColumn;
  83. }
  84. void SetDescriptionLine(long x)
  85. {
  86. _descriptionLine = x;
  87. }
  88. void SetDescriptionColumn(long x)
  89. {
  90. _descriptionColumn = x;
  91. }
  92. void SetReference( const char * const s)
  93. {
  94. if( _reference)
  95. delete [] _reference;
  96. _reference = NewString(s);
  97. }
  98. const char * GetReference() const
  99. {
  100. return _reference;
  101. }
  102. long GetReferenceLine() const
  103. {
  104. return _referenceLine;
  105. }
  106. long GetReferenceColumn() const
  107. {
  108. return _referenceColumn;
  109. }
  110. void SetReferenceLine(long x)
  111. {
  112. _referenceLine = x;
  113. }
  114. void SetReferenceColumn(long x)
  115. {
  116. _referenceColumn = x;
  117. }
  118. // A debugging function
  119. void WriteType(ostream &outStream) const;
  120. };
  121. #endif