FileFormatManager.h 873 Bytes
#ifndef FILEFORMATMANAGER_H
#define FILEFORMATMANAGER_H

#include "../Application/Application.h"
#include "../XMLManager/XMLManager.h"

#define TREPS_FORMATS_XSD "formats.xsd"

using namespace TREPS::Application;
using namespace TREPS::XMLManager;

namespace TREPS
{
	namespace File
	{
		class FileFormatManagerClass
		{
			public:
				FileFormatManagerClass(void);

				~FileFormatManagerClass(void);

				//load the file formats xml file = xsd validation
				bool init(const char *format_path);

				//get file format from id
				t_FileFormat getFileFormatFromId(const char *format_id);

				//get id from file format
				string getFileFormatIdFromFileFormat(t_FileFormat format);

				//detect the file format from file path
				t_FileFormat detectFileFormat(const char *filePath);

			private:
				ApplicationClass *app;

				XMLManagerClass *loader;
		};
	}
}

#endif