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

#include <record.h>

Collaboration diagram for AgeAreaRecord:
Collaboration graph

Public Member Functions

 AgeAreaRecord (Int64 locationId, Int64 ageClassId, double)
 
 ~AgeAreaRecord ()
 
bool operator== (const AgeAreaRecord &other) const
 
size_t hash () const
 
AgeAreaRow asPersistable () const
 
StdAgeAreaRow asTuple () const
 
void merge (const AgeAreaRecord &other)
 
void setId (Int64 id)
 
Int64 getId () const
 

Private Attributes

size_t _hash = -1
 
Int64 _id
 
Int64 _locationId
 
Int64 _ageClassId
 
double _area
 

Constructor & Destructor Documentation

◆ AgeAreaRecord()

AgeAreaRecord ( Int64  locationId,
Int64  ageClassId,
double  area 
)

Constructor.

Initialise AgeAreaRecord._locationId as parameter locationId,AgeAreaRecord._ageClassId as parameter ageClassId and AgeAreaRecord._area as parameter area.

Parameters
locationIdInt64
ageClassIdInt64
areadouble

◆ ~AgeAreaRecord()

Member Function Documentation

◆ asPersistable()

AgeAreaRow asPersistable ( ) const

◆ asTuple()

StdAgeAreaRow asTuple ( ) const

Return StdAgeAreaRow using AgeAreaRecord._id,AgeAreaRecord._locationId,AgeAreaRecord._ageClassId and AgeAreaRecord._area.

Returns
StdAgeAreaRow

◆ getId()

Int64 getId ( ) const

◆ hash()

size_t hash ( ) const

if AgeAreaRecord._hash is equal to -1,
assign AgeAreaRecord._hash as moja::hash::hash_combine() using AgeAreaRecord._locationId and AgeAreaRecord._ageClassId.
return AgeAreaRecord._hash.

Returns
size_t

◆ merge()

void merge ( const AgeAreaRecord other)

Increase AgeAreaRecord._area by parameter other AgeAreaRecord._area.

Parameters
otherAgeAreaRecord& return void

◆ operator==()

bool operator== ( const AgeAreaRecord other) const

Check if AgeAreaRecord._locationId is equal to parameter other AgeAreaRecord._locationId and AgeAreaRecord._ageClassId is equal to parameter other AgeAreaRecord._ageClassId.
return boolean value.

Parameters
otherAgeAreaRecord&
Returns
bool

◆ setId()

void setId ( Int64  id)

Member Data Documentation

◆ _ageClassId

Int64 _ageClassId
private

◆ _area

double _area
private

◆ _hash

size_t _hash = -1
mutableprivate

◆ _id

Int64 _id
private

◆ _locationId

Int64 _locationId
private

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