Stores information that is useful to duration strings. Based on the geos::units time constants.
More...
#include <Units.hpp>
|
double const | m_totalSeconds = 0.0 |
| Total time (including the decimal part) this instance represents in seconds.
|
|
int const | m_years = 0 |
| Number of integral years to show.
|
|
int const | m_days = 0 |
| Number of integral days to show.
|
|
int const | m_hours = 0 |
| Number of integral hours to show.
|
|
int const | m_minutes = 0 |
| Number of integral minutes to show.
|
|
int const | m_seconds = 0 |
| Number of integral seconds to show.
|
|
|
std::ostream & | operator<< (std::ostream &os, TimeFormatInfo const &ctx) |
| Insert the string representation information in the provided stream.
|
|
Stores information that is useful to duration strings. Based on the geos::units time constants.
Definition at line 215 of file Units.hpp.
◆ TimeFormatInfo()
geos::units::TimeFormatInfo::TimeFormatInfo |
( |
double |
totalSeconds, |
|
|
int |
years, |
|
|
int |
days, |
|
|
int |
hours, |
|
|
int |
minutes, |
|
|
int |
seconds |
|
) |
| |
Construct a TimeFormatInfo from raw data (which must be coherent)
- Parameters
-
totalSeconds | The total time (including the decimal part) this instance represents in seconds |
years | Number of integral years to show |
days | Number of integral days to show |
hours | Number of integral hours to show |
minutes | Number of integral minutes to show |
seconds | Number of integral seconds to show |
◆ fromDuration()
template<typename DURATION >
TimeFormatInfo geos::units::TimeFormatInfo::fromDuration |
( |
DURATION |
duration | ) |
|
|
static |
- Returns
- A TimeFormatInfo constructed from a standard typed duration value
- Parameters
-
duration | the duration to represents, in SystemClock::duration type (more types can be added by adding std::chrono::duration template specialisations). |
Definition at line 274 of file Units.hpp.
◆ fromSeconds()
static TimeFormatInfo geos::units::TimeFormatInfo::fromSeconds |
( |
double const |
seconds | ) |
|
|
static |
- Returns
- A TimeFormatInfo constructed from the seconds to represent
- Parameters
-
seconds | the total time to represents in seconds (including the decimal part) |
◆ toSecondsString()
string geos::units::TimeFormatInfo::toSecondsString |
( |
| ) |
const |
- Returns
- a precise string representation of this structure (decimal seconds).
◆ toString()
string geos::units::TimeFormatInfo::toString |
( |
| ) |
const |
- Returns
- a comprehensive string representation of this structure.
◆ toUnfoldedString()
string geos::units::TimeFormatInfo::toUnfoldedString |
( |
| ) |
const |
- Returns
- a user friendly string representation of this structure (YDHMS format, without subsecond details).
The documentation for this struct was generated from the following file: