Lumiera  0.pre.03
»edit your freedom«
Duration Class Reference

#include "lib/time/timevalue.hpp"

Description

Duration is the internal Lumiera time metric.

It is an absolute (positive) value, but can be promoted from an offset. While Duration generally is treated as immutable value, there is the possibility to send a Mutation message.

Note
Duration relies on Offset being limited

Definition at line 477 of file timevalue.hpp.

Public Member Functions

 Duration (Offset const &distance)
 
 Duration (TimeValue const &timeSpec)
 
 Duration (FSecs const &timeSpan_in_secs)
 
 Duration (FrameCnt count, FrameRate const &fps)
 duration of the given number of frames. More...
 
 Duration (TimeSpan const &interval)
 
 Duration (Duration const &o)
 
void accept (Mutation const &)
 
 operator std::string () const
 
Offset operator- () const
 Supporting backwards use as offset.
 
- 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 Duration MAX
 maximum possible temporal extension More...
 
static const Duration NIL {Time::ZERO}
 constant to indicate "no duration"
 
- 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

Durationoperator= (Duration 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)
 
TimeValueoperator= (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
 

Constructor & Destructor Documentation

◆ Duration()

Duration ( FrameCnt  count,
FrameRate const &  fps 
)
inline

duration of the given number of frames.

Note
always positive; count used absolute

Definition at line 503 of file timevalue.hpp.

References TimeValue::t_.

Member Function Documentation

◆ operator std::string()

operator std::string ( ) const

diagnostics

Member Data Documentation

◆ MAX

const Duration MAX
static
Initial value:
= []{
auto maxDelta {Time::MAX - Time::MIN};
return reinterpret_cast<Duration const&> (maxDelta);
}()

maximum possible temporal extension

Definition at line 516 of file timevalue.hpp.

Referenced by Offset::Offset(), ZoomWindow_test::safeguard_extremeOffset(), ZoomWindow_test::safeguard_extremeTimePos(), and ZoomWindow_test::safeguard_verySmall().

+ Inheritance diagram for Duration:
+ Collaboration diagram for Duration:

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