GCBM
|
#include <record.h>
Public Member Functions | |
ClassifierSetRecord (std::vector< Poco::Nullable< std::string >> classifierValues) | |
~ClassifierSetRecord () | |
bool | operator== (const ClassifierSetRecord &other) const |
size_t | hash () const |
ClassifierSetRow | asPersistable () const |
void | merge (const ClassifierSetRecord &other) |
void | setId (Int64 id) |
Int64 | getId () const |
Private Attributes | |
size_t | _hash = -1 |
Int64 | _id |
std::vector< Poco::Nullable< std::string > > | _classifierValues |
|
explicit |
Constructor.
Initialise ClassifierSetRecord._classifierValues as parameter classifierValues.
classifierValues | vector<Nullable<string>> |
~ClassifierSetRecord | ( | ) |
ClassifierSetRow asPersistable | ( | ) | const |
Return ClassifierSetRow using ClassifierSetRecord._id ,ClassifierSetRecord._classifierValues.
Int64 getId | ( | ) | const |
size_t hash | ( | ) | const |
If ClassifierSetRecord._hash is equal to -1,
assign ClassifierSetRecord._hash as moja::hash::hash_range() using first value of ClassifierSetRecord._classifierValues,last value of ClassifierSetRecord._classifierValues,0 and moja::Hash(). return ClassifierSetRecord._hash.
void merge | ( | const ClassifierSetRecord & | other | ) |
bool operator== | ( | const ClassifierSetRecord & | other | ) | const |
For each value in ClassifierSetRecord._classifierValues, if the value is not equal to corresponding value in parameter other ClassifierSetRecord._classifierValues.
return false.
else, return true.
other | ClassifierSetRecord& |
void setId | ( | Int64 | id | ) |
|
private |
|
mutableprivate |
|
private |