Medial Code Documentation
Loading...
Searching...
No Matches
Effected_Field.h
1#ifndef __EFFECTED_FIELD__H__
2#define __EFFECTED_FIELD__H__
3
4#include <string>
5using namespace std;
6typedef enum {
7 PREDICTION = 0,
8 NUMERIC_ATTRIBUTE = 1,
9 STRING_ATTRIBUTE = 2,
10 JSON_DATA = 3,
11 FEATURE = 4,
12
13 LAST_UNDEFINED = 5
14} Field_Type;
15
17public:
18 Field_Type field = Field_Type::LAST_UNDEFINED;
19 string value_name = "";
21 Effected_Field(Field_Type f, const string &val) {
22 field = f;
23 value_name = val;
24 }
25
26 bool operator==(const Effected_Field& other) const
27 {
28 if (this->field == other.field && this->value_name == other.value_name) return true;
29 else return false;
30 }
31
33 {
34 size_t operator()(const Effected_Field& other) const
35 {
36 size_t xHash = std::hash<int>()(other.field);
37 size_t yHash = std::hash<string>()(other.value_name) << 1;
38 return xHash ^ yHash;
39 }
40 };
41};
42
43#endif
Definition Effected_Field.h:16
Definition StdDeque.h:58
Definition Effected_Field.h:33