GCBM
Public Member Functions | Private Attributes | List of all members
ClassifierSetRecord Class Reference

#include <record.h>

Collaboration diagram for ClassifierSetRecord:
Collaboration graph

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
 

Constructor & Destructor Documentation

◆ ClassifierSetRecord()

ClassifierSetRecord ( std::vector< Poco::Nullable< std::string >>  classifierValues)
explicit

Constructor.

Initialise ClassifierSetRecord._classifierValues as parameter classifierValues.

Parameters
classifierValuesvector<Nullable<string>>

◆ ~ClassifierSetRecord()

Member Function Documentation

◆ asPersistable()

ClassifierSetRow asPersistable ( ) const

Return ClassifierSetRow using ClassifierSetRecord._id ,ClassifierSetRecord._classifierValues.

Returns
ClassifierSetRow

◆ getId()

Int64 getId ( ) const

◆ hash()

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.

Returns
size_t

◆ merge()

void merge ( const ClassifierSetRecord other)

◆ operator==()

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.

Parameters
otherClassifierSetRecord&
Returns
bool

◆ setId()

void setId ( Int64  id)

Member Data Documentation

◆ _classifierValues

std::vector<Poco::Nullable<std::string> > _classifierValues
private

◆ _hash

size_t _hash = -1
mutableprivate

◆ _id

Int64 _id
private

The documentation for this class was generated from the following files: