GCBM
|
#include <record.h>
Public Member Functions | |
DisturbanceRecord (Int64 locationId, Int64 distRecId, Int64 previousLocationId, double area) | |
~DisturbanceRecord () | |
bool | operator== (const DisturbanceRecord &other) const |
size_t | hash () const |
DisturbanceRow | asPersistable () const |
StdDisturbanceRow | asTuple () const |
void | merge (const DisturbanceRecord &other) |
void | setId (Int64 id) |
Int64 | getId () const |
Private Attributes | |
size_t | _hash = -1 |
Int64 | _id |
Int64 | _locationId |
Int64 | _distRecId |
Int64 | _previousLocationId |
double | _area |
DisturbanceRecord | ( | Int64 | locationId, |
Int64 | distRecId, | ||
Int64 | previousLocationId, | ||
double | area | ||
) |
Constructor
Initialise variables DisturbanceRecord._locationId as parameter locationId,DisturbanceRecord._distRecId as parameter distRecId,
DisturbanceRecord._previousLocationId as parameter previousLocationId and DisturbanceRecord._area as parameter area.
locationId | Int64 |
distRecId | Int64 |
previousLocationId | Int64 |
area | double |
~DisturbanceRecord | ( | ) |
DisturbanceRow asPersistable | ( | ) | const |
Return DisturbanceRow using DisturbanceRecord._id,DisturbanceRecord._locationId,DisturbanceRecord._distRecId,
DisturbanceRecord._distRecId,DisturbanceRecord._previousLocationId and DisturbanceRecord._area.
StdDisturbanceRow asTuple | ( | ) | const |
Return StdDisturbanceRow using DisturbanceRecord._id,DisturbanceRecord._locationId,DisturbanceRecord._distRecId,
DisturbanceRecord._distRecId,DisturbanceRecord._previousLocationId and DisturbanceRecord._area.
Int64 getId | ( | ) | const |
size_t hash | ( | ) | const |
If DisturbanceRecord._hash is equal to -1, assign DisturbanceRecord._hash as moja::moja::hash_combine() using DisturbanceRecord._locationId,DisturbanceRecord._distRecId,
DisturbanceRecord._distRecId and DisturbanceRecord._previousLocationId as parameters.
return DisturbanceRecord._hash.
void merge | ( | const DisturbanceRecord & | other | ) |
Increase DisturbanceRecord._area by parameter other DisturbanceRecord._area.
other | DisturbanceRecord& |
bool operator== | ( | const DisturbanceRecord & | other | ) | const |
Check if DisturbanceRecord._locationId is equal to parameter other DisturbanceRecord._locationId,
DisturbanceRecord._distRecId is equal to parameter other DisturbanceRecord._distRecId and
DisturbanceRecord._previousLocationId is equal to parameter other DisturbanceRecord._previousLocationId
return boolean values.
other | DisturbanceRecord& |
void setId | ( | Int64 | id | ) |
|
private |
|
private |
|
mutableprivate |
|
private |
|
private |
|
private |