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.

72 lines
2.1 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1995 - 1998.
  5. //
  6. // File: SeqSort.hxx
  7. //
  8. // Contents: Sequential cursor for sorted results.
  9. //
  10. // Classes: CSequentialSerial
  11. //
  12. // History: 05-Jun-95 KyleP Created
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. #include "distrib.hxx"
  17. #include "rowcomp.hxx"
  18. #include "rowcache.hxx"
  19. #include "rowheap.hxx"
  20. //+---------------------------------------------------------------------------
  21. //
  22. // Class: CSequentialSerial
  23. //
  24. // Purpose: Sequential cursor for sorted results.
  25. //
  26. // History: 05-Jun-95 KyleP Created.
  27. //
  28. //----------------------------------------------------------------------------
  29. class CSequentialSorted : public CDistributedRowset
  30. {
  31. public:
  32. CSequentialSorted( IUnknown * pUnkOuter,
  33. IUnknown ** ppMyUnk,
  34. IRowset ** aChild,
  35. unsigned cChild,
  36. CMRowsetProps const & Props,
  37. unsigned cColumns,
  38. CSort const & sort,
  39. CAccessorBag & aAccessors);
  40. STDMETHOD(RestartPosition) (HCHAPTER hChapter);
  41. protected:
  42. STDMETHOD (_GetNextRows) ( HCHAPTER hChapter,
  43. DBROWOFFSET cRowsToSkip,
  44. DBROWCOUNT cRows,
  45. DBCOUNTITEM * pcRowsObtained,
  46. HROW * * aHRows );
  47. friend class CScrollableSorted;
  48. ~CSequentialSorted();
  49. CRowComparator _Comparator; // Compares two rows
  50. XArray<DBBINDING> _bindSort; // Bindings needed by comparator
  51. ULONG _cbSort; // Max length of sort data
  52. private:
  53. XArray<PMiniRowCache *> _apCursor; // One fat cursor per child (max).
  54. CRowHeap _heap; // Cursor heap
  55. CCIOleDBError _DBErrorObj; // error obj used by containing obj.
  56. };