A class to represent ordinal time period. More...
#include <OrdinalPeriod.h>
Public Member Functions | |
AbstractData * | clone () const |
It returns a clone of this object. More... | |
DateTimeType | getDateTimeType () const |
It returns the subtype of the date and time type. More... | |
DateTimeInstant * | getFinalInstant () const |
It gets the final date time instant. More... | |
Int64 | getFinalTime () const |
It returns the final time instant. More... | |
DateTimeInstant * | getInitialInstant () const |
It gets the initial date time instant. More... | |
Int64 | getInitialTime () const |
It returns the inital time instant. More... | |
int | getTypeCode () const |
It returns the data type code associated to date and time values: DATETIME_TYPE. More... | |
bool | operator!= (const DateTime &rhs) const |
Operator !=. More... | |
bool | operator< (const DateTime &rhs) const |
Operator <. More... | |
bool | operator== (const DateTime &rhs) const |
Operator ==. More... | |
bool | operator> (const DateTime &rhs) const |
Operator > More... | |
OrdinalPeriod () | |
Empty constructor. More... | |
OrdinalPeriod (Int64 it, Int64 ft) | |
Constructor. More... | |
void | setFinalInstant (Int64 ft) |
It sets the final time instant. More... | |
void | setInitialInstant (Int64 it) |
It sets the inital time instant. More... | |
std::string | toString () const |
It returns the time period in a textual format (initialTimeInstant-finalTimeinstant) More... | |
Protected Attributes | |
OrdinalInstant | m_finalInstant |
The final time instant information. More... | |
OrdinalInstant | m_initialInstant |
The initial time instant information. More... | |
A class to represent ordinal time period.
A time period represented by two ordinal numbers: the first one to represent the inital time and the second one the final time. Examples: a time period whose initial time is the first epidemiological week and the final time is the fifht epidemiological week.
To understand the meaning of the ordinal numbers, a user has to use extra information, such as the temporal resolution and the starting time in the DateTimeProperty.
Definition at line 55 of file OrdinalPeriod.h.
te::dt::OrdinalPeriod::OrdinalPeriod | ( | ) |
Empty constructor.
Constructor.
it | The initial time instant. |
ft | The final time instant. |
|
virtual |
|
inlinevirtual |
It returns the subtype of the date and time type.
Implements te::dt::DateTime.
Definition at line 171 of file OrdinalPeriod.h.
References te::dt::ORDINAL_TIME_PERIOD.
|
virtual |
It gets the final date time instant.
Implements te::dt::DateTimePeriod.
|
inline |
It returns the final time instant.
Definition at line 82 of file OrdinalPeriod.h.
|
virtual |
It gets the initial date time instant.
Implements te::dt::DateTimePeriod.
|
inline |
It returns the inital time instant.
Definition at line 75 of file OrdinalPeriod.h.
|
inlinevirtualinherited |
It returns the data type code associated to date and time values: DATETIME_TYPE.
Implements te::dt::AbstractData.
Definition at line 103 of file DateTime.h.
References te::dt::DATETIME_TYPE.
|
virtual |
Operator !=.
rhs | The time period to be compared. |
Implements te::dt::DateTime.
|
virtual |
Operator <.
rhs | The right-hand-side time period to be compared. |
Implements te::dt::DateTime.
|
virtual |
Operator ==.
rhs | The time period to be compared. |
Implements te::dt::DateTime.
|
virtual |
Operator >
rhs | The right-hand-side time period to be compared. |
Implements te::dt::DateTime.
|
inline |
It sets the final time instant.
ft | The final time instant. |
Definition at line 114 of file OrdinalPeriod.h.
|
inline |
It sets the inital time instant.
it | The initial time instant. |
Definition at line 107 of file OrdinalPeriod.h.
|
virtual |
It returns the time period in a textual format (initialTimeInstant-finalTimeinstant)
Implements te::dt::AbstractData.
|
protected |
The final time instant information.
Definition at line 176 of file OrdinalPeriod.h.
|
protected |
The initial time instant information.
Definition at line 175 of file OrdinalPeriod.h.