26 #ifndef __TERRALIB_DATATYPE_INTERNAL_TIMEDURATION_H
27 #define __TERRALIB_DATATYPE_INTERNAL_TIMEDURATION_H
33 #include <boost/cstdint.hpp>
34 #include <boost/date_time/posix_time/posix_time.hpp>
63 TimeDuration(
long hours,
long minutes,
long seconds, boost::int64_t fracSeconds = 0);
77 const boost::posix_time::time_duration&
getTimeDuration()
const {
return m_timeDuration; }
91 long getHours()
const {
return static_cast<long>(m_timeDuration.hours()); }
98 long getMinutes()
const {
return static_cast<long>(m_timeDuration.minutes()); }
105 long getSeconds()
const {
return static_cast<long>(m_timeDuration.seconds()); }
An abstract class for date and time types.
A base class for values that can be retrieved from the data access module.
A class to represent time duration with nano-second/micro-second resolution.
boost::posix_time::time_duration m_timeDuration
The internal time duration information.
bool operator<(const DateTime &rhs) const
Operator <.
boost::int64_t getFractionalSeconds() const
It returns the fractional seconds.
TimeDuration(long hours, long minutes, long seconds, boost::int64_t fracSeconds=0)
Constructor.
long getMinutes() const
It returns the minutes of a hour - from 0 to 59.
std::string toString() const
It returns the time duration in the ISO textual format (hh:mm:ss,ss).
boost::posix_time::time_duration & getTimeDuration()
It returns the boost time duration type.
virtual ~TimeDuration()
Destructor.
bool operator>(const DateTime &rhs) const
Operator <.
long getHours() const
It returns the hours of a day - from 0 to 23.
long getSeconds() const
It returns the seconds of a minute - from 0 to 59.
const boost::posix_time::time_duration & getTimeDuration() const
It returns the boost time duration type.
DateTimeType getDateTimeType() const
It returns the subtype of the date and time type.
bool operator!=(const DateTime &rhs) const
Operator !=.
TimeDuration(boost::posix_time::time_duration &t)
Constructor.
AbstractData * clone() const
It returns a clone of this object.
bool operator==(const DateTime &rhs) const
Operator ==.
long operator-(const TimeDuration &rhs) const
Operator -.
DateTimeType
The subtype of date and time type, based on ISO 8621.
#define TEDATATYPEEXPORT
You can use this macro in order to export/import classes and functions from this module.