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.

94 lines
1.7 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. Environment:
  9. ULIB, User Mode
  10. --*/
  11. #if ! defined( _SORTED_LIST_ITERATOR_ )
  12. #define _SORTED_LIST_ITERATOR_
  13. #include "iterator.hxx"
  14. //
  15. // Forward references
  16. //
  17. DECLARE_CLASS( SORTED_LIST );
  18. DECLARE_CLASS( SORTED_LIST_ITERATOR );
  19. class SORTED_LIST_ITERATOR : public ITERATOR {
  20. friend SORTED_LIST;
  21. public:
  22. VIRTUAL
  23. ~SORTED_LIST_ITERATOR(
  24. );
  25. VIRTUAL
  26. POBJECT
  27. FindNext(
  28. IN PCOBJECT Key
  29. );
  30. VIRTUAL
  31. POBJECT
  32. GetCurrent(
  33. );
  34. VIRTUAL
  35. POBJECT
  36. GetNext(
  37. );
  38. VIRTUAL
  39. POBJECT
  40. GetPrevious(
  41. );
  42. VIRTUAL
  43. VOID
  44. Reset(
  45. );
  46. protected:
  47. DECLARE_CAST_MEMBER_FUNCTION( SORTED_LIST_ITERATOR );
  48. DECLARE_CONSTRUCTOR( SORTED_LIST_ITERATOR );
  49. NONVIRTUAL
  50. BOOLEAN
  51. Initialize(
  52. IN OUT PSORTED_LIST List
  53. );
  54. NONVIRTUAL
  55. VOID
  56. Construct(
  57. );
  58. private:
  59. PSORTED_LIST _List; // Sorted List
  60. ULONG _CurrentIndex; // Current index
  61. };
  62. #endif // _SORTED_LIST_ITERATOR_