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.

56 lines
1.2 KiB

  1. /*************************************************
  2. * slot.h *
  3. * *
  4. * Copyright (C) 1995-1999 Microsoft Inc. *
  5. * *
  6. *************************************************/
  7. #ifndef _DEST_H_
  8. #define _DEST_H_
  9. #include "queue.h"
  10. class CSlot : public CObList
  11. {
  12. public:
  13. CSlot(int nBlockNo);
  14. ~CSlot();
  15. BOOL IsOver() const;
  16. BOOL IsIdle() const;
  17. CBlock* GetRunningBlock() const;
  18. int GetCurrentLayer() const;
  19. void ResetCurrentLayer();
  20. void ResetRunningBlock();
  21. void ResetSlot();
  22. void SetCurrentLayer(int nLayer);
  23. void StepCurrentLayer();
  24. void SetRunningBlock(CBlock* pBlock);
  25. void SetIndex(int nIndex);
  26. int GetIndex() const;
  27. CBlock* Hit(WORD wCode,BOOL& bRunning,int& nLayer);
  28. protected:
  29. int m_nBlockNo;
  30. CBlock* m_pRunningBlock;
  31. int m_nCurrentLayer;
  32. int m_nIndex;
  33. };
  34. class CSlotManager : public CObArray
  35. {
  36. public:
  37. CSlotManager(CBlockDoc* pDoc);
  38. ~CSlotManager();
  39. void Land();
  40. int GetIdleSlot();
  41. void AddRunningBlock(int nNo,CBlock* pBlock);
  42. CBlock* Hit(WORD wCode,int& nLayer);
  43. protected:
  44. CBlockDoc* m_pDoc;
  45. int* m_pLayer;
  46. CQueue* m_pQueue;
  47. CObList m_DeadList;
  48. };
  49. #endif