FROSTYSMOOTH
2010-09-27 22:11:03 UTC
//File: QueueMgr.h
#ifndef _QUEUEMGR_H
#define _QUEUEMGR_H
//#includes
using namespace std;
class QueueMgr
{
private:
queue
ifstream input;//for reading file
string filename;
string description;//for title of the queue
bool bFileReady;//set when a file is open and still has lines to read
void OpenFile();//opens the file, assigns bFileReady
public:
QueueMgr();//default constructror, does not open a file
QueueMgr(string fn);//overloaded constructor, passes in the file name
~QueueMgr();//destructor closes the file
void OpenFile(string fn);//calls OpenFile()
bool isReady(){return bFileReady;}
void AddToQ();//adds to the queue from file, and shows
void ServeQ();//serves out the first item in the queue
void ShowQ();//returns size of queue
void FrontQ();//shows item in the front of the queue
void BackQ();//shows item in the back of the queue
void ClearQ();//clears the queue
string GetDescription(){return description;}
};
#endif