-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathValidator.h
35 lines (22 loc) · 1.01 KB
/
Validator.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef __VALIDATIONS__H_
#define __VALIDATIONS__H_
#include <vector>
#include <map>
#include "House.h"
#include "AbstractAlgorithm.h"
typedef int calc_t(const map<string, int>& score_params);
class Validator
{
public:
static string getShortFilename(string const& fullname);
static bool SetConfigurationsFile(string& configDir, map<string,int>& configurations);
static calc_t* SetScoreFormula(string& scoreFormulaDir, void*& dlScore);
static bool SetAlgorithms(string algorithmsDir, vector<void*>& dlibs, void*& dlScore, vector<string>& algorithmErrors);
static bool SetHouses(string housesDir, vector<House>& houses, vector<string>& houseErrors, vector<void*>& dlibs, void*& dlScore);
static int SetNumThreads(string threadCount);
private:
static bool EndsWith(string const& fullString, string const& ending);
static bool IsValidConfigFile(string configPath, map<basic_string<char>, int> configurations);
static vector<string> GetFilesFromDir(string& dir, const string& suffix);
};
#endif //__VALIDATIONS__H_