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

#include <record.h>

Collaboration diagram for AgeClassRecord:
Collaboration graph

Public Member Functions

 AgeClassRecord (Int64 start_age, Int64 end_age)
 
 ~AgeClassRecord ()
 
bool operator== (const AgeClassRecord &other) const
 
size_t hash () const
 
AgeClassRow asPersistable () const
 
StdAgeClassRow asTuple () const
 
void merge (const AgeClassRecord &other)
 
void setId (Int64 id)
 
Int64 getId () const
 

Private Attributes

size_t _hash = -1
 
Int64 _id
 
Int64 _startAge
 
Int64 _endAge
 

Constructor & Destructor Documentation

◆ AgeClassRecord()

AgeClassRecord ( Int64  startAge,
Int64  endAge 
)

Constructor.

Initialise AgeClassRecord._startAge as parameter startAge and AgeClassRecord._endAge as parameter endAge.

Parameters
startAgeInt64
endAgeInt64

◆ ~AgeClassRecord()

Member Function Documentation

◆ asPersistable()

AgeClassRow asPersistable ( ) const

Return AgeClassRow using AgeClassRecord._id, AgeClassRecord._startAge and AgeClassRecord._endAge.

Returns
AgeClassRow

◆ asTuple()

StdAgeClassRow asTuple ( ) const

Return StdAgeClassRow using AgeClassRecord._id, AgeClassRecord._startAge and AgeClassRecord._endAge.

Returns
StdAgeClassRow

◆ getId()

Int64 getId ( ) const

◆ hash()

size_t hash ( ) const

if AgeClassRecord._hash is equal to -1,
assign AgeClassRecord._hash as moja::hash::hash_combine() using AgeClassRecord._startAge and AgeClassRecord._endAge parameters.
return AgeClassRecord._hash.

Returns
size_t

◆ merge()

void merge ( const AgeClassRecord other)

◆ operator==()

bool operator== ( const AgeClassRecord other) const

Check if AgeClassRecord._startAge is equal to parameter other AgeClassRecord._startAge and AgeClassRecord._endAge is equal to parameter other AgeClassRecord._endAge.
return the boolean values.

Returns
bool

◆ setId()

void setId ( Int64  id)

Member Data Documentation

◆ _endAge

Int64 _endAge
private

◆ _hash

size_t _hash = -1
mutableprivate

◆ _id

Int64 _id
private

◆ _startAge

Int64 _startAge
private

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