39 lines
987 B
C
39 lines
987 B
C
#ifndef SOURCEDATA_H
|
|
#define SOURCEDATA_H
|
|
namespace pywrap {
|
|
enum fileType_t { CSV, ARFF, RDATA };
|
|
class SourceData {
|
|
public:
|
|
SourceData(std::string source)
|
|
{
|
|
if (source == "Surcov") {
|
|
path = "datasets/";
|
|
fileType = CSV;
|
|
} else if (source == "Arff") {
|
|
path = "datasets/";
|
|
fileType = ARFF;
|
|
} else if (source == "Tanveer") {
|
|
path = "data/";
|
|
fileType = RDATA;
|
|
} else if (source == "Test") {
|
|
path = "@TEST_DATA_PATH@/";
|
|
fileType = ARFF;
|
|
} else {
|
|
throw std::invalid_argument("Unknown source.");
|
|
}
|
|
}
|
|
std::string getPath()
|
|
{
|
|
return path;
|
|
}
|
|
fileType_t getFileType()
|
|
{
|
|
return fileType;
|
|
}
|
|
private:
|
|
std::string path;
|
|
fileType_t fileType;
|
|
};
|
|
}
|
|
#endif
|