// DataFile.h
// CSI 2131 Asst 2a by Naim R. El-Far (naim@discover.uottawa.ca)
// CSI 2131 - Winter 2006 - Prof. L.M. Moura

// File:	DataFile.h
// Desc:	Header file for class DataFile which handles the data file

#pragma once

#include <iostream>
#include <fstream>
#include "StudentRecord.h"
using namespace std;

class DataFile {
public:
	fstream		dataFileStream;
	string		dataFileName;

	DataFile();
	DataFile(string);
	~DataFile();
	
	StudentRecord*	ReadRecordByOffset(long int); //Retruns a pointer to the record that is sitting at a given offset
	long int		GetCurrentFilePointerOffset(); //Returns the value of tellg
	void			PrintRecordAtOffset(long int); //Print the record sitting in the data file at the given offset
	bool			IsLegalOffset(long int); //Checks if a given offset is within the data file or not
};
