#ifndef ISCRIBE_H
#define ISCRIBE_H

namespace Salamander
{

/*
** Scribes are used to read and write data. They are created using fileio() and each instance of the class
** represents a file.
*/
class IScribe
{
public:
	enum accessMode
	{
		readOnly,
		writeOnly
	};

public:
	/*
	** Destructor.
	*/
	virtual ~IScribe();

protected:
	/*
	** We're an abstract base class, so cannot be instantiated.
	*/
	IScribe(const std::string& filename, accessMode mode);

	
public:
	/*
	** Read a value from file. Most common types are supported, and a full list is defined below.
	*/
	template<typename T>
		T* read() = 0;

	/*
	** Write a value to file. 
	*/
	template<typename T>
		void write(const T& value) = 0;
};

}

#endif //ISCRIBE_H