//----------------------------------------------------------------------
//  SPECIFICATION FILE (process.h)
//----------------------------------------------------------------------
#ifndef PROCESS_H
#define PROCESS_H

#include <iostream.h>
#include <fstream.h>
#include "bool.h"
#include "debug.h"
#include "eventq.h"

typedef enum { OnCPU, InWQ, InRQ, InNQ, InTQ } PStateType;

class Process
{
  private:
        //General Process Information
        int     PID;                    //Process ID number
        int     CreateTime;             //Clock Time the process was created
        int     Priority;               //Process Priority
        EventQ  Pevents;                //Q of future process events

        //Current Process State Information
        EventType CurEvent;             //The current Process Event
        int     ETimeRem;               //Remaining Time for current Event

        //Simulation Statistics
        int     WaitTime;               //Total Time spent in the WaitingQ
        int     TurnTime;               //Total Turnaround Time         
  
   public:
	Process(char *);
	~Process();	

	EventType Age(PStateType);
	void Display();

	int  getPID();
	int  getCreateTime();
	EventType getCurEvent();
	int  getPriority();
	void setPriority(int);

	void setTurnTime(int);
	int getWaitTime();
	int getTurnTime();

  private:
	EventType str2EventType(char *);

};
#endif

