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.

150 lines
3.9 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Copyright (C) Microsoft Corporation, 1991 - 2000.
  4. //
  5. // File: Xpr.cxx
  6. //
  7. // Contents: Internal expression classes
  8. //
  9. // Classes: CXpr
  10. //
  11. // History: 11-Sep-91 KyleP Created
  12. //
  13. //----------------------------------------------------------------------------
  14. #include <pch.cxx>
  15. #pragma hdrstop
  16. #include <xpr.hxx>
  17. //+---------------------------------------------------------------------------
  18. //
  19. // Member: CXpr::IsMatch, public
  20. //
  21. // Arguments: [obj] -- Objects table
  22. //
  23. // Returns: FALSE (default)
  24. //
  25. // History: 01-Dec-91 KyleP Created.
  26. //
  27. //----------------------------------------------------------------------------
  28. BOOL CXpr::IsMatch( CRetriever & )
  29. {
  30. return( FALSE );
  31. }
  32. //+---------------------------------------------------------------------------
  33. //
  34. // Member: CXpr::HitCount, public
  35. //
  36. // Returns: 0 (default)
  37. //
  38. // History: 01-May-91 KyleP Created.
  39. //
  40. //----------------------------------------------------------------------------
  41. ULONG CXpr::HitCount( CRetriever & )
  42. {
  43. return( 0 );
  44. }
  45. //+---------------------------------------------------------------------------
  46. //
  47. // Member: CXpr::Rank, public
  48. //
  49. // Returns: MaxRank (default)
  50. //
  51. // History: 01-May-91 KyleP Created.
  52. //
  53. //----------------------------------------------------------------------------
  54. LONG CXpr::Rank( CRetriever & )
  55. {
  56. return( MAX_QUERY_RANK );
  57. }
  58. //+---------------------------------------------------------------------------
  59. //
  60. // Member: CXpr::ValueType, public
  61. //
  62. // Returns: Default value type (PTNone).
  63. //
  64. // History: 26-Nov-91 KyleP Created.
  65. //
  66. //----------------------------------------------------------------------------
  67. ULONG CXpr::ValueType() const
  68. {
  69. return( VT_EMPTY );
  70. }
  71. //+---------------------------------------------------------------------------
  72. //
  73. // Member: CXpr::Clone(), public
  74. //
  75. // Returns: A new copy of the expression.
  76. //
  77. // Signals: ???
  78. //
  79. // History: 11-Dec-91 KyleP Created.
  80. //
  81. // Notes: This must be subclassed by every node type which will
  82. // actually be cloned.
  83. //
  84. //----------------------------------------------------------------------------
  85. CXpr * CXpr::Clone()
  86. {
  87. //
  88. // It is illegal to clone an expression which hasn't over-ridden this.
  89. //
  90. Win4Assert( 0 );
  91. return( 0 );
  92. }
  93. //+---------------------------------------------------------------------------
  94. //
  95. // Member: CXpr::IsLeaf, public
  96. //
  97. // Synopsis: Determines if an expression is a leaf node.
  98. //
  99. // Returns: TRUE for this default implementation.
  100. //
  101. // History: 11-Dec-91 KyleP Created.
  102. //
  103. //----------------------------------------------------------------------------
  104. BOOL CXpr::IsLeaf() const
  105. {
  106. return( TRUE );
  107. }
  108. //+---------------------------------------------------------------------------
  109. //
  110. // Member: CXpr::GetValue, public
  111. //
  112. // Synopsis: Calculates the value of the expression for the current object.
  113. //
  114. // Arguments: [obj] -- Objects table. Positioned to current object.
  115. // [p] -- Buffer to store value.
  116. // [pcb] -- On input, size of p, on output, return size if
  117. // successful, else required size.
  118. //
  119. // Returns: GVRNotSupported for this default implementation.
  120. //
  121. // History: 11-Dec-91 KyleP Created.
  122. //
  123. // Notes: This is a virtual method of CXpr to make it a simple
  124. // transformation to allow *any* expression to return a
  125. // value instead of just property value expressions.
  126. //
  127. //----------------------------------------------------------------------------
  128. GetValueResult CXpr::GetValue(CRetriever &, PROPVARIANT *, ULONG *)
  129. {
  130. return( GVRNotSupported );
  131. }