netxsimdg
Loading...
Searching...
No Matches
Nextsim::TimePoint Class Reference
Collaboration diagram for Nextsim::TimePoint:
Collaboration graph

Public Types

typedef SystemClock Clock
 
typedef std::chrono::time_point< Clock, Duration::Basis > Basis
 

Public Member Functions

 TimePoint (const std::string &str)
 
 TimePoint (const TimePoint &, const Duration &)
 
Duration operator- (const TimePoint &a) const
 
TimePointoperator+= (const Duration &d)
 
TimePointoperator-= (const Duration &d)
 
TimePoint operator+ (const Duration &d) const
 
bool operator<= (const TimePoint &a) const
 
bool operator< (const TimePoint &a) const
 
bool operator>= (const TimePoint &a) const
 
bool operator> (const TimePoint &a) const
 
bool operator== (const TimePoint &a) const
 
bool operator!= (const TimePoint &a) const
 
std::istream & parse (std::istream &is)
 
TimePointparse (const std::string &str)
 
std::ostream & format (std::ostream &os) const
 
std::string format () const
 
std::tm * gmtime () const
 

Public Attributes

friend Duration
 

Static Public Attributes

static const std::string ymdFormat = "%Y-%m-%d"
 
static const std::string doyFormat = "%Y-%j"
 
static const std::string ymdhmsFormat = ymdFormat + hmsFormat
 
static const std::string doyhmsFormat = doyFormat + hmsFormat
 
static const std::string hmsFormat = "T%H:%M:%SZ"
 

Detailed Description

Definition at line 138 of file Time.hpp.

Member Typedef Documentation

◆ Basis

std::chrono::time_point<Clock, Duration::Basis> Nextsim::TimePoint::Basis

Definition at line 141 of file Time.hpp.

◆ Clock

SystemClock Nextsim::TimePoint::Clock

Definition at line 140 of file Time.hpp.

Constructor & Destructor Documentation

◆ TimePoint() [1/2]

Nextsim::TimePoint::TimePoint ( )
inline

Definition at line 143 of file Time.hpp.

◆ TimePoint() [2/2]

Nextsim::TimePoint::TimePoint ( const std::string & str)
inline

Definition at line 145 of file Time.hpp.

Member Function Documentation

◆ format() [1/2]

std::string Nextsim::TimePoint::format ( ) const
inline

Definition at line 194 of file Time.hpp.

◆ format() [2/2]

std::ostream & Nextsim::TimePoint::format ( std::ostream & os) const
inline

Definition at line 186 of file Time.hpp.

◆ gmtime()

std::tm * Nextsim::TimePoint::gmtime ( ) const

Definition at line 234 of file Time.cpp.

◆ operator!=()

bool Nextsim::TimePoint::operator!= ( const TimePoint & a) const
inline

Definition at line 170 of file Time.hpp.

◆ operator+()

TimePoint Nextsim::TimePoint::operator+ ( const Duration & d) const
inline

Definition at line 159 of file Time.hpp.

◆ operator+=()

TimePoint & Nextsim::TimePoint::operator+= ( const Duration & d)
inline

Definition at line 149 of file Time.hpp.

◆ operator-()

Duration Nextsim::TimePoint::operator- ( const TimePoint & a) const
inline

Definition at line 148 of file Time.hpp.

◆ operator-=()

TimePoint & Nextsim::TimePoint::operator-= ( const Duration & d)
inline

Definition at line 154 of file Time.hpp.

◆ operator<()

bool Nextsim::TimePoint::operator< ( const TimePoint & a) const
inline

Definition at line 166 of file Time.hpp.

◆ operator<=()

bool Nextsim::TimePoint::operator<= ( const TimePoint & a) const
inline

Definition at line 165 of file Time.hpp.

◆ operator==()

bool Nextsim::TimePoint::operator== ( const TimePoint & a) const
inline

Definition at line 169 of file Time.hpp.

◆ operator>()

bool Nextsim::TimePoint::operator> ( const TimePoint & a) const
inline

Definition at line 168 of file Time.hpp.

◆ operator>=()

bool Nextsim::TimePoint::operator>= ( const TimePoint & a) const
inline

Definition at line 167 of file Time.hpp.

◆ parse() [1/2]

TimePoint & Nextsim::TimePoint::parse ( const std::string & str)
inline

Definition at line 179 of file Time.hpp.

◆ parse() [2/2]

std::istream & Nextsim::TimePoint::parse ( std::istream & is)
inline

Definition at line 172 of file Time.hpp.

Member Data Documentation

◆ doyFormat

const std::string Nextsim::TimePoint::doyFormat = "%Y-%j"
static

Definition at line 204 of file Time.hpp.

◆ doyhmsFormat

const std::string Nextsim::TimePoint::doyhmsFormat = doyFormat + hmsFormat
static

Definition at line 206 of file Time.hpp.

◆ Duration

friend Nextsim::TimePoint::Duration

Definition at line 209 of file Time.hpp.

◆ hmsFormat

const std::string Nextsim::TimePoint::hmsFormat = "T%H:%M:%SZ"
static

Definition at line 207 of file Time.hpp.

◆ ymdFormat

const std::string Nextsim::TimePoint::ymdFormat = "%Y-%m-%d"
static

Definition at line 203 of file Time.hpp.

◆ ymdhmsFormat

const std::string Nextsim::TimePoint::ymdhmsFormat = ymdFormat + hmsFormat
static

Definition at line 205 of file Time.hpp.


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