process.h

来自「操作系统 程序实现一个虚拟机模拟多道的运行环境」· C头文件 代码 · 共 43 行

H
43
字号
// Process.h: interface for the CProcess class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_PROCESS_H__A5B0FFA4_1CD9_41E4_937F_1898B2F6AF3A__INCLUDED_)
#define AFX_PROCESS_H__A5B0FFA4_1CD9_41E4_937F_1898B2F6AF3A__INCLUDED_

#include "UseDevice.h"	// Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CProcess  
{
public:
	BOOL AddStep(CUseDevice ud);
	CUseDevice* GetCurrentDevice(){return CurrentDevice;}
	BOOL ProcessIsRunning(){return Finished!=GetProcessStatus();}	//查看进程是否还在运行
	BOOL StepFinished(){return Finished==GetStepStatus();}
	void SetProcessStatus(int status){this->ProcessStatus=status;}
	void SetStepStatus(int status){this->StepStatus=status;}
	void WaitNextDevice();
	void Run();
	int GetProcessStatus(){return ProcessStatus;}
	int GetStepStatus(){return StepStatus;}
	CProcess(CString);
	virtual ~CProcess();
	CString GetProcessName(){return ProcessName;}
#ifdef _DEBUG
	CPtrArray ToUseDevice;
#endif

private:
	CString ProcessName;
#ifndef _DEBUG 
	CPtrArray ToUseDevice;
#endif
	CUseDevice* CurrentDevice;
	BOOL ProcessStatus;
	int StepStatus;
	enum{NotStated,Running,Waiting,Finished};
};
#endif // !defined(AFX_PROCESS_H__A5B0FFA4_1CD9_41E4_937F_1898B2F6AF3A__INCLUDED_)

⌨️ 快捷键说明

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