A class to represent time period.
More...
#include <TimePeriod.h>
A class to represent time period.
A time period is a part of the continous time axis limited by two time instants or points. Each time instant is composed of a date that uses the Gregorian calendar and of a local time. Internally, it uses the datetime boost library to represent time period, by using the data type boost::posix_time::time_period.
- See also
- DateTime, Date, DatePeriod, DateDuration, TimePeriodTZ, TimeInstant, TimeInstantTZ, TimeDuration
Definition at line 54 of file TimePeriod.h.
te::dt::TimePeriod::TimePeriod |
( |
| ) |
|
Constructor.
- Parameters
-
initialTime | A initial time instant. |
finalTime | A final time instant. |
te::dt::TimePeriod::TimePeriod |
( |
const boost::posix_time::time_period & |
t | ) |
|
virtual te::dt::TimePeriod::~TimePeriod |
( |
| ) |
|
|
virtual |
It gets the final date time instant.
- Returns
- The final time instant
- Note
- The caller will take the ownership of the returned pointer.
Implements te::dt::DateTimePeriod.
TimeInstant te::dt::TimePeriod::getFinalTimeInstant |
( |
| ) |
const |
It gets the final time instant.
- Returns
- The final time instant
It gets the initial date time instant.
- Returns
- The initial time instant
- Note
- The caller will take the ownership of the returned pointer.
Implements te::dt::DateTimePeriod.
TimeInstant te::dt::TimePeriod::getInitialTimeInstant |
( |
| ) |
const |
It gets the initial time instant.
- Returns
- The initial time instant
const boost::posix_time::time_period& te::dt::TimePeriod::getTimePeriod |
( |
| ) |
const |
|
inline |
Assignment operator.
It returns the boost time period type.
- Returns
- The boost time period type.
Definition at line 86 of file TimePeriod.h.
boost::posix_time::time_period& te::dt::TimePeriod::getTimePeriod |
( |
| ) |
|
|
inline |
It returns the boost time period type.
- Returns
- The boost time period type.
Definition at line 93 of file TimePeriod.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::TimePeriod::operator!= |
( |
const DateTime & |
rhs | ) |
const |
|
virtual |
Operator !=.
- Parameters
-
rhs | The time period to be compared. |
- Returns
- It returns true if the two time periods are not equal. Otherwise, it returns false.
Implements te::dt::DateTime.
bool te::dt::TimePeriod::operator< |
( |
const DateTime & |
rhs | ) |
const |
|
virtual |
Operator <.
- Parameters
-
rhs | The right-hand-side time period to be compared. |
- Returns
- It returns true if the right-hand-side time period is greater than the lefth side one. Otherwise, it returns false.
Implements te::dt::DateTime.
bool te::dt::TimePeriod::operator== |
( |
const DateTime & |
rhs | ) |
const |
|
virtual |
Operator ==.
- Parameters
-
rhs | The time period to be compared. |
- Returns
- It returns true if the two time period are equal. Otherwise, it returns false.
Implements te::dt::DateTime.
bool te::dt::TimePeriod::operator> |
( |
const DateTime & |
rhs | ) |
const |
|
virtual |
Operator >
- Parameters
-
rhs | The right-hand-side time period to be compared. |
- Returns
- It returns true if the right-hand-side time period is less than the lefth side one. Otherwise, it returns false.
Implements te::dt::DateTime.
std::string te::dt::TimePeriod::toString |
( |
| ) |
const |
|
virtual |
It returns the time period in the ISO textual format (YYYYMMDDThhmmss/YYYYMMDDThhmmss).
- Returns
- The time period in the ISO textual format (YYYYMMDDThhmmss/YYYYMMDDThhmmss).
Implements te::dt::AbstractData.
boost::posix_time::time_period te::dt::TimePeriod::m_timePeriod |
|
protected |
The documentation for this class was generated from the following file:
- /home/castejon/castejon_files/develop/terralib5/git_master/terralib5/src/terralib/datatype/TimePeriod.h