⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 machine.h

📁 data structures, algorithms and Application书的源代码
💻 H
字号:
//Machine class used in machine shop simulation
#ifndef Machine_
#define Machine_

class Machine {
   friend Job* ChangeState(int);
   public:
      Machine() {TotalWait = NumTasks = 0;
                 Active = 0;}
      bool IsEmpty() {return JobQ.IsEmpty();}
      void AddJob(Job* x) {JobQ.Add(x);}
      void SetChange(long w) {ChangeTime = w;}
      void Stats(long& tw, long& nt)
              {tw = TotalWait;
               nt = NumTasks;}
   private:
      LinkedQueue<Job*> JobQ; // queue of waiting jobs
      long ChangeTime;  // machine changeover time
      long TotalWait;   // total delay at this machine
      long  NumTasks;   // number of tasks processed
      Job *Active;      // pointer to current job
};

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -