// Program Name:  Process Scheduler
// Programmer: Mark Dehus, 42
// Assignment Number: Project #1
// Purpose: To simulate and show the process scheduling
//			system of an operating system.

// Tested and compiled on Minigw (GCC 3.2) with Dev-C++ 4.9.8.0
// there is a couple problems on VC++ because it is outdated
// and no longer meets current ISO C++ - go and update your compiler.

#ifndef PCB_H
#define PCB_H
#include <iostream>
#include <string>

using namespace std;

class PCB 
{
	private:
		int pid;
		string name;
		string state;
		int start_time;
		int exec_time;
		int io_break;
		int running_time;
		int tot_exec_time;
		int io_finish_time;
  		
	public:
		PCB(){}
  		PCB(string,int,int,int,int);
		~PCB(){}
		int get_start_time(){return start_time;}
		int get_io_finish_time(){return io_finish_time;}
		int get_tot_exec_time(){return tot_exec_time;}
		int get_exec_time(){return exec_time;}
		int get_io_break(){return io_break;}
		void set_start_time(int tme){start_time = tme;}
		void set_io_finish_time(int tme){io_finish_time = tme;}
		void inc_tot_exec_time(int tme){tot_exec_time += tme;}
		void dump_vars(int &,string &,int &,int &,int &,int &);
		void set_runtime(int amt){running_time = amt;}
		void decrease_exec(int amt){exec_time -= amt;}
		void set_state(string s){state = s;}
		string get_name(){return name + "(" + state + ")";}
		string get_pid();
	
};

#endif

