Source code of Windows XP (NT5)
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.

62 lines
1.0 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. CQueue.h
  5. Abstract:
  6. Class definition and constants
  7. for the C++ queue class.
  8. Notes:
  9. Unicode only.
  10. History:
  11. 10/10/2000 a-fwills Created
  12. --*/
  13. #ifndef __CQueue_h__
  14. #define __CQueue_h__
  15. #include <windows.h>
  16. #include <string.h>
  17. class CQNode {
  18. private:
  19. LPWSTR m_lpwszString;
  20. public:
  21. CQNode *m_pNext;
  22. public:
  23. CQNode(LPWSTR lpwString);
  24. ~CQNode();
  25. Copy(LPWSTR lpwString, int nMaxLen);
  26. int GetLength() { return wcslen(m_lpwszString); }
  27. };
  28. class CQueue {
  29. private:
  30. int m_cSize;
  31. CQNode *m_pHead,
  32. *m_pTail;
  33. public:
  34. CQueue();
  35. ~CQueue();
  36. BOOL Enqueue(LPWSTR lpwszString);
  37. BOOL Dequeue(LPWSTR lpwString, int nMaxLen, BOOL fPersist);
  38. int GetLength(); // Length of string at head of queue.
  39. int GetSize() { return m_cSize; } // Size of queue.
  40. };
  41. #endif __CQueue_h__