te::dt::DateTimePeriod Class Referenceabstract

An abstract class to represent a period of date and time. More...

#include <DateTimePeriod.h>

Inheritance diagram for te::dt::DateTimePeriod:
te::dt::DateTime te::dt::AbstractData te::dt::DatePeriod te::dt::OrdinalPeriod te::dt::TimePeriod te::dt::TimePeriodTZ

Public Member Functions

virtual AbstractDataclone () const =0
 It returns a clone of this object. More...
 
 DateTimePeriod ()
 Default constructor. More...
 
virtual DateTimeType getDateTimeType () const =0
 It returns the subtype of the date and time type. More...
 
virtual DateTimeInstantgetFinalInstant () const =0
 It gets the final date time instant. More...
 
virtual DateTimeInstantgetInitialInstant () const =0
 It gets the initial date time instant. More...
 
int getTypeCode () const
 It returns the data type code associated to date and time values: DATETIME_TYPE. More...
 
virtual bool operator!= (const DateTime &) const =0
 Operator !=. More...
 
virtual bool operator< (const DateTime &) const =0
 Operator <. More...
 
virtual bool operator== (const DateTime &) const =0
 Operator ==. More...
 
virtual bool operator> (const DateTime &) const =0
 Operator > More...
 
virtual std::string toString () const =0
 It returns the data value in a string notation. More...
 
virtual ~DateTimePeriod ()
 Virtual destructor. More...
 

Detailed Description

An abstract class to represent a period of date and time.

A time period is a part of the continous time axis limited by two time instants or points.

See also
DateTime

Definition at line 48 of file DateTimePeriod.h.

Constructor & Destructor Documentation

te::dt::DateTimePeriod::DateTimePeriod ( )

Default constructor.

virtual te::dt::DateTimePeriod::~DateTimePeriod ( )
virtual

Virtual destructor.

Member Function Documentation

virtual DateTimeType te::dt::DateTime::getDateTimeType ( ) const
pure virtualinherited

It returns the subtype of the date and time type.

Returns
The subtype of the date and time type.

Implemented in te::dt::DatePeriod, te::dt::TimePeriod, te::dt::TimeDuration, te::dt::Date, te::dt::TimeInstant, te::dt::TimePeriodTZ, te::dt::OrdinalPeriod, te::dt::TimeInstantTZ, te::dt::DateDuration, and te::dt::OrdinalInstant.

virtual DateTimeInstant* te::dt::DateTimePeriod::getFinalInstant ( ) const
pure virtual

It gets the final date time instant.

Returns
The final time instant
Note
The caller will take the ownership of the returned pointer.

Implemented in te::dt::DatePeriod, te::dt::TimePeriod, te::dt::TimePeriodTZ, and te::dt::OrdinalPeriod.

virtual DateTimeInstant* te::dt::DateTimePeriod::getInitialInstant ( ) const
pure virtual

It gets the initial date time instant.

Returns
The initial time instant
Note
The caller will take the ownership of the returned pointer.

Implemented in te::dt::DatePeriod, te::dt::TimePeriod, te::dt::TimePeriodTZ, and te::dt::OrdinalPeriod.

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.

virtual bool te::dt::DateTime::operator!= ( const DateTime ) const
pure virtualinherited

Operator !=.

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

Implemented in te::dt::DatePeriod, te::dt::TimePeriod, te::dt::TimePeriodTZ, te::dt::OrdinalPeriod, te::dt::TimeInstant, te::dt::TimeDuration, te::dt::Date, te::dt::DateDuration, te::dt::OrdinalInstant, and te::dt::TimeInstantTZ.

virtual bool te::dt::DateTime::operator< ( const DateTime ) const
pure virtualinherited

Operator <.

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

Implemented in te::dt::DatePeriod, te::dt::TimePeriod, te::dt::TimePeriodTZ, te::dt::OrdinalPeriod, te::dt::TimeInstant, te::dt::TimeDuration, te::dt::Date, te::dt::DateDuration, te::dt::OrdinalInstant, and te::dt::TimeInstantTZ.

virtual bool te::dt::DateTime::operator== ( const DateTime ) const
pure virtualinherited

Operator ==.

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

Implemented in te::dt::DatePeriod, te::dt::TimePeriod, te::dt::TimePeriodTZ, te::dt::OrdinalPeriod, te::dt::TimeInstant, te::dt::TimeDuration, te::dt::Date, te::dt::DateDuration, te::dt::OrdinalInstant, and te::dt::TimeInstantTZ.

virtual bool te::dt::DateTime::operator> ( const DateTime ) const
pure virtualinherited

Operator >

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

Implemented in te::dt::DatePeriod, te::dt::TimePeriod, te::dt::TimePeriodTZ, te::dt::OrdinalPeriod, te::dt::TimeInstant, te::dt::TimeDuration, te::dt::Date, te::dt::DateDuration, te::dt::OrdinalInstant, and te::dt::TimeInstantTZ.


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