#ifndef FILEIO_H
#define FILEIO_H

namespace Salamander
{

/*
** File IO handles all tasks related to the filesystem.
*/
class FileIO
{
public:
	/*
	** Destructor.
	*/
    virtual ~FileIO();
	
	/*
	** Static access to the fileio class.
	*/
	static FileIO& fileio();

public:
	/*
	** Reporting functions for use in debugging. TODO : These can be routed to the console or
	** to a file.
	*/
	void error(std::string error, std::string function = "");
	void warning(std::string warning, std::string function = "");
	void log(std::string log, std::string function = "");

protected:
	/*
	** Because FileIO is a static class, it can only be created by it's instance access method.
	*/
	FileIO();        
};

/*
** Static class access.
*/
static FileIO& fileio()
{
	return FileIO::fileio();
}

}

// Include function names in error reports
/*
#ifndef FILEIO_CPP

	#define error(string_error) error(std::string(string_error), std::string(__FUNCTION__))
	#define warning(string_warning) warning(std::string(string_warning), std::string(__FUNCTION__))
	#define log(string_log) log(std::string(string_log), std::string(__FUNCTION__))

#endif
*/

#endif // FILEIO_H
