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.

59 lines
1.3 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1993.
  5. //
  6. // File: queue.hxx
  7. //
  8. // Contents: CQueue class definition.
  9. //
  10. // Classes: CQueue
  11. //
  12. // Functions: None.
  13. //
  14. // History: 25-Oct-95 MarkBl Created
  15. //
  16. //----------------------------------------------------------------------------
  17. #ifndef __QUEUE_HXX__
  18. #define __QUEUE_HXX__
  19. //+---------------------------------------------------------------------------
  20. //
  21. // Class: CQueue
  22. //
  23. // Synopsis: Front-end queue class of doubly-linked list node objects.
  24. //
  25. // History: 25-Oct-95 MarkBl Created
  26. //
  27. // Notes: None.
  28. //
  29. //----------------------------------------------------------------------------
  30. class CQueue
  31. {
  32. public:
  33. CQueue(void) : _cElems(0), _pdlFirst(NULL) { ; }
  34. virtual ~CQueue() { ; }
  35. void AddElement(CDLink * pdl);
  36. ULONG GetCount(void) { return(_cElems); }
  37. CDLink * GetFirstElement(void) { return(_pdlFirst); }
  38. CDLink * RemoveElement(CDLink * pdl);
  39. CDLink * RemoveElement(void) {
  40. return(this->RemoveElement(_pdlFirst));
  41. }
  42. private:
  43. ULONG _cElems;
  44. CDLink * _pdlFirst;
  45. };
  46. #endif // __QUEUE_HXX__