Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/time/timevalue.hpp"
basic constant internal time value.
These time values provide the implementation base for all further time types. They can be created by wrapping up a raw micro tick value (gavl_time_t), are totally ordered, but besides that, they are opaque and non-mutable.
Definition at line 133 of file timevalue.hpp.
Public Member Functions | |
TimeValue (gavl_time_t val) | |
TimeValue (TimeValue const &o) | |
copy initialisation allowed | |
bool | isRegular () const |
operator std::string () const | |
Static Public Member Functions | |
static TimeValue | buildRaw_ (gavl_time_t) |
Static Public Attributes | |
static const gavl_time_t | SCALE = GAVL_TIME_SCALE |
Number of micro ticks (µs) per second as basic time scale. | |
Friends | |
gavl_time_t | _raw (TimeValue const &time) |
HashVal | hash_value (TimeValue const &) |
derive a hash from the µ-tick value More... | |
class | Mutation |
some subclasses may receive modification messages | |
bool | operator< (TimeValue const &t1, TimeValue const &t2) |
bool | operator< (TimeValue const &t1, gavl_time_t t2) |
bool | operator== (TimeValue const &t1, TimeValue const &t2) |
bool | operator== (TimeValue const &t1, gavl_time_t t2) |
bool | operator> (TimeValue const &t1, gavl_time_t t2) |
Protected Member Functions | |
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 | |
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 | |
gavl_time_t | t_ |
the raw (internal) time value used to implement the time types | |
for Offset and Duration entities built on top
Definition at line 161 of file timevalue.hpp.
References TimeValue::limitedDelta(), and TimeValue::t_.
Referenced by QuTime::castInto().
|
inlineexplicit |
val | time given in µ ticks here |
Definition at line 171 of file timevalue.hpp.
References TimeValue::limitedTime().
|
inlinestaticprotected |
explicit limit of allowed time range
applies a limiter on the provided raw time value to keep it within the arbitrary boundaries defined by (Time::MAX, Time::MIN). While Time entities are not
a "safeInt" implementation, we limit new values to lower the likelihood of wrap-around
Definition at line 744 of file timevalue.hpp.
Referenced by TimeValue::TimeValue().
|
static |
backdoor to sneak in a raw time value bypassing any normalisation and limiting
Definition at line 236 of file time.cpp.
References FrameRate::PAL, and FrameRate::STEP.
Referenced by Offset::Offset(), Offset::stretchedByFloatFactor(), Offset::stretchedByRationalFactor(), and Time::Time().
operator std::string | ( | ) | const |
diagnostics
|
inline |
Definition at line 771 of file timevalue.hpp.
References Time::MAX.
Referenced by LoadController::markLagSample(), and LoadController::tendedNext().
|
friend |
to pass Time values to C functions
Definition at line 181 of file timevalue.hpp.
Referenced by lib::time::__framerate_approximation(), TimeSpan::conform(), lib::time::hash_value(), and Offset::Offset().
derive a hash from the µ-tick value
hash-standard.h
Definition at line 725 of file timevalue.hpp.