A class to represent time instant. More...
#include <TimeInstant.h>
  
 Public Member Functions | |
| AbstractData * | clone () const | 
| It returns a clone of this object.  More... | |
| Date | getDate () const | 
| It returns the date associated to time instant.  More... | |
| DateTimeType | getDateTimeType () const | 
| It returns the subtype of the date and time type.  More... | |
| TimeDuration | getTime () const | 
| It returns the time duration associated to time instant.  More... | |
| const boost::posix_time::ptime & | getTimeInstant () const | 
| It returns the boost time instant type.  More... | |
| boost::posix_time::ptime & | getTimeInstant () | 
| It returns the boost time instant 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 TimeInstant &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... | |
| TimeInstant () | |
| Constructor.  More... | |
| TimeInstant (const Date &d, const TimeDuration &td) | |
| Constructor from a date and time offset.  More... | |
| TimeInstant (const boost::posix_time::ptime &t) | |
| Constructor.  More... | |
| TimeInstant (const std::string &dtime) | |
| Constructor.  More... | |
| std::string | toString () const | 
| It returns the time instant in the ISO textual format (YYYYMMDDTHHMMSS,fffffffff) where T is the date-time separator.  More... | |
| virtual | ~TimeInstant () | 
| Constructor.  More... | |
Protected Attributes | |
| boost::posix_time::ptime | m_timeInstant | 
| The internal time instant information.  More... | |
A class to represent time instant.
A time instant is a point on the continuous time axis. It 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 instant, by using the data type boost::posix_time::ptime.
Definition at line 55 of file TimeInstant.h.
| te::dt::TimeInstant::TimeInstant | ( | ) | 
Constructor.
Definition at line 29 of file TimeInstant.cpp.
| te::dt::TimeInstant::TimeInstant | ( | const Date & | d, | 
| const TimeDuration & | td | ||
| ) | 
Constructor from a date and time offset.
| d | The date. | 
| td | Time offset. | 
Definition at line 34 of file TimeInstant.cpp.
| te::dt::TimeInstant::TimeInstant | ( | const boost::posix_time::ptime & | t | ) | 
| te::dt::TimeInstant::TimeInstant | ( | const std::string & | dtime | ) | 
Constructor.
It constructs a time instant from a non delimited ISO form string. Example: 20020131T235959
| dtime | ISO form string | 
Definition at line 44 of file TimeInstant.cpp.
      
  | 
  virtual | 
Constructor.
Definition at line 99 of file TimeInstant.cpp.
      
  | 
  virtual | 
It returns a clone of this object.
Implements te::dt::AbstractData.
Definition at line 87 of file TimeInstant.cpp.
      
  | 
  inline | 
It returns the date associated to time instant.
Definition at line 106 of file TimeInstant.h.
Referenced by te::ado::GetFormattedDateTime().
      
  | 
  inlinevirtual | 
It returns the subtype of the date and time type.
Implements te::dt::DateTime.
Definition at line 179 of file TimeInstant.h.
References te::dt::TIME_INSTANT.
| te::dt::TimeDuration te::dt::TimeInstant::getTime | ( | ) | const | 
It returns the time duration associated to time instant.
Definition at line 49 of file TimeInstant.cpp.
Referenced by te::ado::GetFormattedDateTime().
      
  | 
  inline | 
It returns the boost time instant type.
Definition at line 92 of file TimeInstant.h.
      
  | 
  inline | 
It returns the boost time instant type.
Definition at line 99 of file TimeInstant.h.
      
  | 
  inlinevirtualinherited | 
It returns the data type code associated to date and time values: DATETIME_TYPE.
Implements te::dt::AbstractData.
Definition at line 103 of file DateTime.h.
References te::dt::DATETIME_TYPE.
Referenced by getDouble().
      
  | 
  virtual | 
Operator !=.
| rhs | The time instant to be compared. | 
Implements te::dt::DateTime.
Definition at line 62 of file TimeInstant.cpp.
References m_timeInstant.
| long te::dt::TimeInstant::operator- | ( | const TimeInstant & | rhs | ) | const | 
Operator -.
| rhs | The right-hand-side time instant. | 
Definition at line 80 of file TimeInstant.cpp.
References m_timeInstant.
      
  | 
  virtual | 
Operator <.
| rhs | The right-hand-side time instant to be compared. | 
Implements te::dt::DateTime.
Definition at line 68 of file TimeInstant.cpp.
References m_timeInstant.
      
  | 
  virtual | 
Operator ==.
| rhs | The time instant to be compared. | 
Implements te::dt::DateTime.
Definition at line 56 of file TimeInstant.cpp.
References m_timeInstant.
      
  | 
  virtual | 
Operator >
| rhs | The right-hand-side time instant to be compared. | 
Implements te::dt::DateTime.
Definition at line 74 of file TimeInstant.cpp.
References m_timeInstant.
      
  | 
  virtual | 
It returns the time instant in the ISO textual format (YYYYMMDDTHHMMSS,fffffffff) where T is the date-time separator.
Implements te::dt::AbstractData.
Definition at line 92 of file TimeInstant.cpp.
      
  | 
  protected | 
The internal time instant information.
Definition at line 186 of file TimeInstant.h.
Referenced by operator!=(), operator-(), operator<(), operator==(), and operator>().