// FileManager.h - Obsahuje deklarace funkcí pro ukládání klasifikátorů a trénovacích množin do souboru
// Autor:   Jan Benda
// Datum:   13.03.2021

#ifndef FILEMANAGER_H
#define FILEMANAGER_H

#define FILEMANAGER_API __declspec(dllexport)

#include "Classifier.h"

namespace filemanager
	{
	void writeClassifiersXML(cv::FileStorage iFileStorage, Classification::Classifiers iClassifiers, std::string iName);
	void writeDatasetXML(cv::FileStorage iFileStorage, const std::vector<Dataset::TrainingSample> iTraining, std::string iName);
	extern "C++" FILEMANAGER_API void writeXML(std::string& iFilename, Classification::Classifiers& iClassifiers_909, Classification::Classifiers& iClassifiers_910, Classification::Classifiers& iClassifiers_911, Classification::Classifiers& iClassifiers_912, Dataset::Dataset& iDataset);

	void readClassifiersXML(Classification::Classifiers& iClassifiers, const std::string iName, cv::FileNode iNode);
	void readDatasetXML(std::vector<Dataset::TrainingSample>& iTraining, const std::string iName, cv::FileNode iNode);
	extern "C++" FILEMANAGER_API void readXML(std::string& iFilename, Classification::Classifiers& iClassifiers_909, Classification::Classifiers& iClassifiers_910, Classification::Classifiers& iClassifiers_911, Classification::Classifiers& iClassifiers_912, Dataset::Dataset& iDataset);
	}
#endif
