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

#include <record.h>

Collaboration diagram for DateRecord:
Collaboration graph

Public Member Functions

 DateRecord (int step, int year, int month, int day, double fracOfStep, double yearsInStep)
 
 ~DateRecord ()
 
bool operator== (const DateRecord &other) const
 
size_t hash () const
 
DateRow asPersistable () const
 
StdDateRow asTuple () const
 
void merge (const DateRecord &other)
 
void setId (Int64 id)
 
Int64 getId () const
 

Private Attributes

size_t _hash = -1
 
Int64 _id
 
int _step
 
int _year
 
int _month
 
int _day
 
double _fracOfStep
 
double _yearsInStep
 

Constructor & Destructor Documentation

◆ DateRecord()

DateRecord ( int  step,
int  year,
int  month,
int  day,
double  fracOfStep,
double  yearsInStep 
)

Constructor.

Initialise variables DateRecord._step as parameter step,DateRecord._year as parameter year,DateRecord._month as parameter month
DateRecord._day as parameter day,DateRecord._fracOfStep as parameter fracOfStep and DateRecord._yearsInStep as parameter yearsInStep.

Parameters
stepint
yearint
monthint
dayint
fracOfStepdouble
yearsInStep

◆ ~DateRecord()

~DateRecord ( )

Member Function Documentation

◆ asPersistable()

DateRow asPersistable ( ) const

◆ asTuple()

StdDateRow asTuple ( ) const

◆ getId()

Int64 getId ( ) const

◆ hash()

size_t hash ( ) const

If DateRecord._hash is equal to -1, assign DateRecord._hash as moja::hash::hash_combine() using DateRecord._step as a parameter.
return DateRecord._hash.

Returns
size_t

◆ merge()

void merge ( const DateRecord other)

◆ operator==()

bool operator== ( const DateRecord other) const

Check if DateRecord._step is equal to parameter other DateRecord._step.
return the boolean value

Parameters
otherDateRecord&
Returns
bool

◆ setId()

void setId ( Int64  id)

Member Data Documentation

◆ _day

int _day
private

◆ _fracOfStep

double _fracOfStep
private

◆ _hash

size_t _hash = -1
mutableprivate

◆ _id

Int64 _id
private

◆ _month

int _month
private

◆ _step

int _step
private

◆ _year

int _year
private

◆ _yearsInStep

double _yearsInStep
private

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