Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/time/timevalue.hpp"
Lumiera's internal time value datatype.
This is a TimeValue, but now more specifically denoting a point in time, measured in reference to an internal (opaque) time scale.
Lumiera Time provides some limited capabilities for direct manipulation; Time values can be created directly from (ms,sec,min,hour)
specification and there is an string representation intended for internal use (reporting and debugging). Any real output, formatting and persistent storage should be based on the (quantised) timecode formats though, which can be generated from time values.
Similar to TimeValue, also Time objects are considered immutable values. As convenience shortcut, some operators are provided, creating a TimVar for further calculations.
Definition at line 299 of file timevalue.hpp.
Public Member Functions | |
Time (TimeValue const &val=TimeValue(0)) | |
Time (TimeVar const &calcResult) | |
Time (FSecs const &fractionalSeconds) | |
convenience constructor to build an Time value from a fraction of seconds, given as rational number. More... | |
Time (long millis, uint secs, uint mins=0, uint hours=0) | |
convenience constructor to build an internal Lumiera Time value from the usual parts of an sexagesimal time specification. More... | |
operator std::string () const | |
TimeVar | operator+ (TimeValue const &tval) const |
convenience start for time calculations | |
TimeVar | operator- (TimeValue const &tval) const |
TimeVar | operator- () const |
Public Member Functions inherited from TimeValue | |
TimeValue (gavl_time_t val) | |
TimeValue (TimeValue const &o) | |
copy initialisation allowed | |
bool | isRegular () const |
operator std::string () const | |
Static Public Attributes | |
static const Time | ANYTIME |
border condition marker value. ANYTIME <= any time value | |
static const Time | MAX |
static const Time | MIN |
static const Time | NEVER |
border condition marker value. NEVER >= any time value | |
static const Time | ZERO |
Static Public Attributes inherited from TimeValue | |
static const gavl_time_t | SCALE = GAVL_TIME_SCALE |
Number of micro ticks (µs) per second as basic time scale. | |
Private Member Functions | |
Time (int) | |
suppress possible direct conversions | |
Time & | operator= (Time const) |
direct assignment prohibited | |
Additional Inherited Members | |
Static Public Member Functions inherited from TimeValue | |
static TimeValue | buildRaw_ (gavl_time_t) |
Protected Member Functions inherited from TimeValue | |
TimeValue (TimeValue const &origin, TimeValue const &target) | |
TimeValue & | operator= (TimeValue const &o) |
Assigning of time values is not allowed, but derived classed might allow that. | |
Static Protected Member Functions inherited from TimeValue | |
static gavl_time_t | limitedDelta (gavl_time_t origin, gavl_time_t target) |
safe calculation of explicitly limited time offset | |
static gavl_time_t | limitedTime (gavl_time_t raw) |
explicit limit of allowed time range More... | |
Protected Attributes inherited from TimeValue | |
gavl_time_t | t_ |
the raw (internal) time value used to implement the time types | |
convenience constructor to build an Time value from a fraction of seconds, given as rational number.
An example would be to the time unit of a framerate.
Definition at line 126 of file time.cpp.
References TimeValue::buildRaw_().
Time | ( | long | millis, |
uint | secs, | ||
uint | mins = 0 , |
||
uint | hours = 0 |
||
) |
convenience constructor to build an internal Lumiera Time value from the usual parts of an sexagesimal time specification.
Arbitrary integral values are acceptable and will be summed up accordingly. The minute and hour part can be omitted.
operator std::string | ( | ) | const |
diagnostics
|
static |
Definition at line 309 of file timevalue.hpp.
Referenced by TimeValue_test::checkMutableTime(), TimeSpan::conform(), Timings::constantFrameTimingsInterval(), TimeValue::isRegular(), Timings::isValid(), Offset::Offset(), ZoomWindow::placeWindowRelativeToAnchor(), ZoomWindow_test::safeguard_extremeOffset(), ZoomWindow_test::safeguard_extremeTimePos(), and ZoomWindow_test::safeguard_verySmall().