
//

//CTextReader.h


/*******************************************************
//
//	Name: CTextReader.h
//
//	Author: Dave Ratti
//
//	Date:6-04-01
//
//	Modified: Finished 6-04-01
//
//	Notes: This is a class with static methods for getting
//  information from a text file. Specifically, name=value.
//  use getString/getInt/getFloat (name) and we will return
//  the value
//
//
//
*********************************************************/



//watch for double include
#ifndef CTEXTREADER_H
#define CTEXTREADER_H

#include <fstream>
#include <cstdlib>

#include "stringc.h"

///////////////////////////////////////////////////

#define MAX_LENGTH 100
#define defaultFileName "default.txt"

class CTextReader
{
	public:

		CTextReader(){  }
		~CTextReader(){  }

				
		//get fucntions

		static STRINGC getString(STRINGC name){ return getString(name,defaultFileName); }
		static int getInt(STRINGC name){ return getInt(name,defaultFileName); }
		static float getFloat(STRINGC name){ return getFloat(name,defaultFileName); }

		static STRINGC getString(STRINGC name, STRINGC file){ return getString(name, file, 1); }
		static int getInt(STRINGC name, STRINGC file){ return getInt(name, file, 1); }
		static float getFloat(STRINGC name, STRINGC file){ return getFloat(name, file, 1); }

		static STRINGC getString(STRINGC name, STRINGC file, int Nbr);
		static int getInt(STRINGC name, STRINGC file, int Nbr);
		static float getFloat(STRINGC name, STRINGC file, int Nbr);
	
		

	protected:

		

		static STRINGC getLineWithValue(STRINGC name, STRINGC file, int nbr);
		



};


#endif

