OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
otb::MetaData::TimePoint Class Reference

#include <otbDateTime.h>

+ Inheritance diagram for otb::MetaData::TimePoint:
+ Collaboration diagram for otb::MetaData::TimePoint:

Public Types

using InternalTimePointType = details::InternalTimePointType
 

Public Member Functions

std::ostream & Display (std::ostream &os) const
 
unsigned int GetDay () const
 
unsigned int GetHour () const
 
double GetJulianDay () const
 
unsigned int GetMinute () const
 
double GetModifiedJulianDay () const
 
unsigned int GetMonth () const
 
double GetSecond () const
 
int GetYear () const
 
std::istream & Read (std::istream &is, const std::string &format=details::timePointFormat)
 
 TimePoint ()
 
 TimePoint (InternalTimePointType const &t)
 

Static Public Member Functions

template<typename U , typename V >
static U diff (V const &lhs, V const &rhs)
 

Private Attributes

InternalTimePointType m_Time
 

Friends

TimePointoperator+= (TimePoint &u, Duration const &v)
 
TimePointoperator-= (TimePoint &u, Duration const &v)
 
bool operator< (TimePoint const &lhs, TimePoint const &rhs)
 
bool operator== (TimePoint const &lhs, TimePoint const &rhs)
 

Detailed Description

Represents a point in Time.

Definition at line 94 of file otbDateTime.h.

Member Typedef Documentation

◆ InternalTimePointType

Definition at line 100 of file otbDateTime.h.

Constructor & Destructor Documentation

◆ TimePoint() [1/2]

otb::MetaData::TimePoint::TimePoint ( )
inline

Definition at line 102 of file otbDateTime.h.

◆ TimePoint() [2/2]

otb::MetaData::TimePoint::TimePoint ( InternalTimePointType const &  t)
inline

Definition at line 103 of file otbDateTime.h.

Member Function Documentation

◆ diff()

template<typename U , typename V >
static U otb::MetaData::TimePoint::diff ( V const &  lhs,
V const &  rhs 
)
inlinestatic

Definition at line 108 of file otbDateTime.h.

◆ Display()

std::ostream& otb::MetaData::TimePoint::Display ( std::ostream &  os) const

◆ GetDay()

unsigned int otb::MetaData::TimePoint::GetDay ( ) const

Return the calendar day corresponding to the time point (from 1 to 31)

◆ GetHour()

unsigned int otb::MetaData::TimePoint::GetHour ( ) const

Return the hour of the day corresponding to the time point (from 0 to 23)

◆ GetJulianDay()

double otb::MetaData::TimePoint::GetJulianDay ( ) const

Return the julian day corresponding to the time point

◆ GetMinute()

unsigned int otb::MetaData::TimePoint::GetMinute ( ) const

Return the minute of the hour of the day corresponding to the time point (from 0 to 59)

◆ GetModifiedJulianDay()

double otb::MetaData::TimePoint::GetModifiedJulianDay ( ) const

Return the modified julian day corresponding to the time point

◆ GetMonth()

unsigned int otb::MetaData::TimePoint::GetMonth ( ) const

Return the month of the year corresponding to the time point (from 1 to 12)

◆ GetSecond()

double otb::MetaData::TimePoint::GetSecond ( ) const

Return the fractional second of the minute of the hour of the day corresponding to the time point (from 0 and inferior to 60)

◆ GetYear()

int otb::MetaData::TimePoint::GetYear ( ) const

Return the year corresponding to the time point

◆ Read()

std::istream& otb::MetaData::TimePoint::Read ( std::istream &  is,
const std::string &  format = details::timePointFormat 
)

Friends And Related Function Documentation

◆ operator+=

TimePoint& operator+= ( TimePoint u,
Duration const &  v 
)
friend

◆ operator-=

TimePoint& operator-= ( TimePoint u,
Duration const &  v 
)
friend

◆ operator<

bool operator< ( TimePoint const &  lhs,
TimePoint const &  rhs 
)
friend

Definition at line 114 of file otbDateTime.h.

◆ operator==

bool operator== ( TimePoint const &  lhs,
TimePoint const &  rhs 
)
friend

Definition at line 119 of file otbDateTime.h.

Member Data Documentation

◆ m_Time

InternalTimePointType otb::MetaData::TimePoint::m_Time
private

Definition at line 152 of file otbDateTime.h.


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