GCBM
|
#include <record.h>
Public Member Functions | |
PoolRecord (Int64 locationId, Int64 poolId, double value) | |
~PoolRecord () | |
bool | operator== (const PoolRecord &other) const |
size_t | hash () const |
PoolRow | asPersistable () const |
StdPoolRow | asTuple () const |
void | merge (const PoolRecord &other) |
void | setId (Int64 id) |
Int64 | getId () const |
Private Attributes | |
size_t | _hash = -1 |
Int64 | _id |
Int64 | _locationId |
Int64 | _poolId |
double | _value |
PoolRecord | ( | Int64 | locationId, |
Int64 | poolId, | ||
double | value | ||
) |
Constructor.
Initialise variables PoolRecord._locationId as parameter locationId,PoolRecord._poolId as parameter poolId,
PoolRecord._value as parameter value
locationId | Int64 |
poolId | Int64 |
value | double |
~PoolRecord | ( | ) |
PoolRow asPersistable | ( | ) | const |
Return PoolRow using PoolRecord._id,PoolRecord._locationId,PoolRecord._poolId and PoolRecord._value.
StdPoolRow asTuple | ( | ) | const |
Return StdPoolRow using PoolRecord._id,PoolRecord._locationId,PoolRecord._poolId and PoolRecord._value.
Int64 getId | ( | ) | const |
size_t hash | ( | ) | const |
If PoolRecord._hash is equal to -1, assign PoolRecord._hash as moja::moja::hash_combine() using PoolRecord._locationId,PoolRecord._poolId.
return PoolRecord._hash.
void merge | ( | const PoolRecord & | other | ) |
Increase PoolRecord._value by parameter other PoolRecord._value.
other | PoolRecord& |
bool operator== | ( | const PoolRecord & | other | ) | const |
Check if PoolRecord._locationId is equal to parameter other PoolRecord._locationId and
PoolRecord._poolId is equal to parameter other PoolRecord._poolId and
return the boolean value,
other | PoolRecord& |
void setId | ( | Int64 | id | ) |
|
mutableprivate |
|
private |
|
private |
|
private |
|
private |