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.

50 lines
1.4 KiB

  1. /******************************************************************************
  2. * queue.h *
  3. *---------*
  4. *
  5. *------------------------------------------------------------------------------
  6. * Copyright (C) 2000 Microsoft Corporation Date: 02/29/00
  7. * All Rights Reserved
  8. *
  9. ********************************************************************* PACOG ***/
  10. #ifndef __QUEUE_H_
  11. #define __QUEUE_H_
  12. #include <windows.h>
  13. struct Phone;
  14. struct PhoneString {
  15. Phone* pPhones;
  16. int iNumPhones;
  17. float* pfF0;
  18. int iNumF0;
  19. };
  20. class CPhStrQueue {
  21. public:
  22. CPhStrQueue (int iLength);
  23. ~CPhStrQueue ();
  24. bool Push (Phone* pPhones, int iNumPhones, float* pfF0, int iNumF0);
  25. bool Pop (Phone** ppPhones, int* piNumPhones, float** ppfF0, int* piNumF0);
  26. bool FirstElement (Phone** ppPhones, int* piNumPhones, float** ppfF0, int* piNumF0);
  27. bool Forward ();
  28. int Size ();
  29. void Debug ();
  30. void Reset ();
  31. private:
  32. bool Init ();
  33. PhoneString* m_pArrayBegin; // Top of memory
  34. PhoneString* m_pArrayEnd; // last element of memory
  35. PhoneString* m_pTop; // first entry in the queue
  36. PhoneString* m_pBottom; // last entry in the queue
  37. int m_iLength; // Length of the queue
  38. int m_iNumEntries; // Current Number of entries in the queue
  39. };
  40. #endif