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.

98 lines
1.5 KiB

  1. /*++
  2. Copyright (c) 1990 Microsoft Corporation
  3. Module Name:
  4. sortlit.hxx
  5. Abstract:
  6. This module contains the declaration for the SORTED_LIST_ITERATOR class.
  7. SORTED_LIST_ITERATOR is a concrete implementation of the ITERATOR class.
  8. Author:
  9. Ramon J. San Andres (ramonsa) 29-Oct-1991
  10. Environment:
  11. ULIB, User Mode
  12. --*/
  13. #if ! defined( _SORTED_LIST_ITERATOR_ )
  14. #define _SORTED_LIST_ITERATOR_
  15. #include "iterator.hxx"
  16. //
  17. // Forward references
  18. //
  19. DECLARE_CLASS( SORTED_LIST );
  20. DECLARE_CLASS( SORTED_LIST_ITERATOR );
  21. class SORTED_LIST_ITERATOR : public ITERATOR {
  22. friend SORTED_LIST;
  23. public:
  24. VIRTUAL
  25. ~SORTED_LIST_ITERATOR(
  26. );
  27. VIRTUAL
  28. POBJECT
  29. FindNext(
  30. IN PCOBJECT Key
  31. );
  32. VIRTUAL
  33. POBJECT
  34. GetCurrent(
  35. );
  36. VIRTUAL
  37. POBJECT
  38. GetNext(
  39. );
  40. VIRTUAL
  41. POBJECT
  42. GetPrevious(
  43. );
  44. VIRTUAL
  45. VOID
  46. Reset(
  47. );
  48. protected:
  49. DECLARE_CAST_MEMBER_FUNCTION( SORTED_LIST_ITERATOR );
  50. DECLARE_CONSTRUCTOR( SORTED_LIST_ITERATOR );
  51. NONVIRTUAL
  52. BOOLEAN
  53. Initialize(
  54. IN OUT PSORTED_LIST List
  55. );
  56. NONVIRTUAL
  57. VOID
  58. Construct(
  59. );
  60. private:
  61. PSORTED_LIST _List; // Sorted List
  62. ULONG _CurrentIndex; // Current index
  63. };
  64. #endif // _SORTED_LIST_ITERATOR_