te::dt::OrdinalInstant Class Reference

A class to represent ordinal time instant. More...

#include <OrdinalInstant.h>

Inheritance diagram for te::dt::OrdinalInstant:
te::dt::DateTimeInstant te::dt::DateTime te::dt::AbstractData

Public Member Functions

AbstractDataclone () const
 It returns a clone of this object. More...
 
DateTimeType getDateTimeType () const
 It returns the subtype of the date and time type. More...
 
Int64 getTimeInstant () const
 It returns the 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...
 
 OrdinalInstant ()
 Empty constructor. More...
 
 OrdinalInstant (Int64 t)
 Constructor. More...
 
void setTimeInstant (Int64 t)
 It sets the time instant. More...
 
std::string toString () const
 It returns the time instant in a textual format. More...
 

Protected Attributes

Int64 m_timeInstant
 The internal time instant information. More...
 

Detailed Description

A class to represent ordinal time instant.

An ordinal number to represent a time instant. Examples: the first/second/etc epidemiological week, the first/second/etc day, etc.

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.

See also
DateTimeInstant

Definition at line 52 of file OrdinalInstant.h.

Constructor & Destructor Documentation

te::dt::OrdinalInstant::OrdinalInstant ( )

Empty constructor.

te::dt::OrdinalInstant::OrdinalInstant ( Int64  t)

Constructor.

Parameters
tThe time instant represented by an integer type.

Member Function Documentation

AbstractData* te::dt::OrdinalInstant::clone ( ) const
virtual

It returns a clone of this object.

Returns
A clone of this object.

Implements te::dt::AbstractData.

DateTimeType te::dt::OrdinalInstant::getDateTimeType ( ) const
inlinevirtual

It returns the subtype of the date and time type.

Returns
The subtype of the date and time type.

Implements te::dt::DateTime.

Definition at line 135 of file OrdinalInstant.h.

References te::dt::ORDINAL_TIME_INSTANT.

Int64 te::dt::OrdinalInstant::getTimeInstant ( ) const
inline

It returns the time instant.

Returns
The time instant.

Definition at line 71 of file OrdinalInstant.h.

int te::dt::DateTime::getTypeCode ( ) const
inlinevirtualinherited

It returns the data type code associated to date and time values: DATETIME_TYPE.

Returns
The data type code associated to the date and time values: DATETIME_TYPE.

Implements te::dt::AbstractData.

Definition at line 103 of file DateTime.h.

References te::dt::DATETIME_TYPE.

bool te::dt::OrdinalInstant::operator!= ( const DateTime rhs) const
virtual

Operator !=.

Parameters
rhsThe time instant to be compared.
Returns
It returns true if the two time instants are not equal. Otherwise, it returns false.

Implements te::dt::DateTime.

bool te::dt::OrdinalInstant::operator< ( const DateTime rhs) const
virtual

Operator <.

Parameters
rhsThe right-hand-side time instant to be compared.
Returns
It returns true if the right-hand-side time instant is greater than the lefth side one. Otherwise, it returns false.

Implements te::dt::DateTime.

bool te::dt::OrdinalInstant::operator== ( const DateTime rhs) const
virtual

Operator ==.

Parameters
rhsThe time instant to be compared.
Returns
It returns true if the two time instants are equal. Otherwise, it returns false.

Implements te::dt::DateTime.

bool te::dt::OrdinalInstant::operator> ( const DateTime rhs) const
virtual

Operator >

Parameters
rhsThe right-hand-side time instant to be compared.
Returns
It returns true if the right-hand-side time instant is less than the lefth side one. Otherwise, it returns false.

Implements te::dt::DateTime.

void te::dt::OrdinalInstant::setTimeInstant ( Int64  t)
inline

It sets the time instant.

Parameters
tThe time instant.

Definition at line 78 of file OrdinalInstant.h.

std::string te::dt::OrdinalInstant::toString ( ) const
virtual

It returns the time instant in a textual format.

Returns
The time instant in a textual format.

Implements te::dt::AbstractData.

Member Data Documentation

Int64 te::dt::OrdinalInstant::m_timeInstant
protected

The internal time instant information.

Definition at line 139 of file OrdinalInstant.h.


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