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

#include <record.h>

Collaboration diagram for PoolRecord:
Collaboration graph

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
 

Constructor & Destructor Documentation

◆ PoolRecord()

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

Parameters
locationIdInt64
poolIdInt64
valuedouble

◆ ~PoolRecord()

~PoolRecord ( )

Member Function Documentation

◆ asPersistable()

PoolRow asPersistable ( ) const

◆ asTuple()

StdPoolRow asTuple ( ) const

Return StdPoolRow using PoolRecord._id,PoolRecord._locationId,PoolRecord._poolId and PoolRecord._value.

Returns
StdPoolRow

◆ getId()

Int64 getId ( ) const

◆ hash()

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.

Returns
size_t

◆ merge()

void merge ( const PoolRecord other)

Increase PoolRecord._value by parameter other PoolRecord._value.

Parameters
otherPoolRecord&
Returns
void

◆ operator==()

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,

Parameters
otherPoolRecord&
Returns
bool

◆ setId()

void setId ( Int64  id)

Member Data Documentation

◆ _hash

size_t _hash = -1
mutableprivate

◆ _id

Int64 _id
private

◆ _locationId

Int64 _locationId
private

◆ _poolId

Int64 _poolId
private

◆ _value

double _value
private

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