All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::dt::TimeInstantTZ Class Reference

A class to represent time instant with time zone. More...

#include <TimeInstantTZ.h>

Inheritance diagram for te::dt::TimeInstantTZ:
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...
 
const
boost::local_time::local_date_time & 
getTimeInstantTZ () const
 It returns the boost time instant with time zone type. More...
 
boost::local_time::local_date_time & getTimeInstantTZ ()
 It returns the boost time instant with time zone type. 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...
 
long operator- (const TimeInstantTZ &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...
 
 TimeInstantTZ (const boost::local_time::local_date_time &t)
 Constructor. More...
 
std::string toString () const
 It returns the time instant with time zone in the ISO textual format (YYYYMMDDThhmmss±hhmm). More...
 
virtual ~TimeInstantTZ ()
 Constructor. More...
 

Protected Attributes

boost::local_time::local_date_time m_timeInstantTZ
 Time instant with time zone information. More...
 

Detailed Description

A class to represent time instant with time zone.

A time instant is a point on the continuous time axis. A time instant with time zone is composed of a date that uses the Gregorian calendar and of a time with an associated time zone. Internally, it uses the datetime boost library to represent time instant with time zone, by using the data type boost::local_time::local_date_time.

See also
DateTime, Date, DatePeriod, DateDuration, TimeInstant, TimePeriod, TimeDuration, TimePeriodTZ

Definition at line 52 of file TimeInstantTZ.h.

Constructor & Destructor Documentation

te::dt::TimeInstantTZ::TimeInstantTZ ( const boost::local_time::local_date_time &  t)
inline

Constructor.

Parameters
tA time instant with time zone.

Definition at line 61 of file TimeInstantTZ.h.

te::dt::TimeInstantTZ::~TimeInstantTZ ( )
virtual

Constructor.

Definition at line 74 of file TimeInstantTZ.cpp.

Member Function Documentation

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

It returns a clone of this object.

Returns
A clone of this object.

Implements te::dt::AbstractData.

Definition at line 59 of file TimeInstantTZ.cpp.

DateTimeType te::dt::TimeInstantTZ::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 144 of file TimeInstantTZ.h.

References te::dt::TIME_INSTANT_TZ.

const boost::local_time::local_date_time& te::dt::TimeInstantTZ::getTimeInstantTZ ( ) const
inline

It returns the boost time instant with time zone type.

Returns
The boost time instant with time zone type.

Definition at line 71 of file TimeInstantTZ.h.

Referenced by te::ado::GetFormattedDateTime().

boost::local_time::local_date_time& te::dt::TimeInstantTZ::getTimeInstantTZ ( )
inline

It returns the boost time instant with time zone type.

Returns
The boost time instant with time zone type.

Definition at line 78 of file TimeInstantTZ.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::TimeInstantTZ::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.

Definition at line 35 of file TimeInstantTZ.cpp.

References m_timeInstantTZ.

long te::dt::TimeInstantTZ::operator- ( const TimeInstantTZ rhs) const

Operator -.

Parameters
rhsThe right-hand-side time instant.
Returns
It returns the number of seconds between the two time instants.

Definition at line 53 of file TimeInstantTZ.cpp.

References m_timeInstantTZ.

bool te::dt::TimeInstantTZ::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.

Definition at line 41 of file TimeInstantTZ.cpp.

References m_timeInstantTZ.

bool te::dt::TimeInstantTZ::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.

Definition at line 29 of file TimeInstantTZ.cpp.

References m_timeInstantTZ.

bool te::dt::TimeInstantTZ::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.

Definition at line 47 of file TimeInstantTZ.cpp.

References m_timeInstantTZ.

std::string te::dt::TimeInstantTZ::toString ( void  ) const
virtual

It returns the time instant with time zone in the ISO textual format (YYYYMMDDThhmmss±hhmm).

Returns
The time instant with time zone in the ISO textual format (YYYYMMDDThhmmss±hhmm).

Implements te::dt::AbstractData.

Definition at line 64 of file TimeInstantTZ.cpp.

Member Data Documentation

boost::local_time::local_date_time te::dt::TimeInstantTZ::m_timeInstantTZ
protected

Time instant with time zone information.

Definition at line 151 of file TimeInstantTZ.h.

Referenced by operator!=(), operator-(), operator<(), operator==(), and operator>().


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