Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
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.

Static Public Attributes

static const Duration NIL {Time::ZERO}
 constant to indicate "no duration"
 
static const Duration MAX
 maximum possible temporal extension
 
- Static Public Attributes inherited from TimeValue
static const raw_time_64 SCALE = 1'000'000
 Number of micro ticks (µs) per second as basic time scale.
 

Public Member Functions

 Duration ()
 
 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.
 
 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 (raw_time_64 val)
 
 TimeValue (TimeValue const &o)
 copy initialisation allowed
 
 operator std::string () const
 
bool isRegular () const
 
std::strong_ordering operator<=> (TimeValue const &) const =default
 
bool operator== (TimeValue const &) const =default
 
std::strong_ordering operator<=> (raw_time_64 tt) const
 
bool operator== (raw_time_64 tt) const
 

Private Member Functions

Durationoperator= (Duration const &)
 direct assignment prohibited
 

Additional Inherited Members

- Static Public Member Functions inherited from TimeValue
static TimeValue buildRaw_ (raw_time_64)
 
- Protected Member Functions inherited from TimeValue
TimeValueoperator= (TimeValue const &o)
 Assigning of time values is not allowed, but derived classed might allow that.
 
 TimeValue (TimeValue const &origin, TimeValue const &target)
 
- Static Protected Member Functions inherited from TimeValue
static raw_time_64 limitedTime (raw_time_64 raw)
 explicit limit of allowed time range
 
static raw_time_64 limitedDelta (raw_time_64 origin, raw_time_64 target)
 safe calculation of explicitly limited time offset
 
- Protected Attributes inherited from TimeValue
raw_time_64 t_
 the raw (internal) time value used to implement the time types
 

Constructor & Destructor Documentation

◆ Duration() [1/7]

Duration ( )
inline

Definition at line 484 of file timevalue.hpp.

◆ Duration() [2/7]

Duration ( Offset const &  distance)
inline

Definition at line 488 of file timevalue.hpp.

◆ Duration() [3/7]

Duration ( TimeValue const &  timeSpec)
inlineexplicit

Definition at line 493 of file timevalue.hpp.

◆ Duration() [4/7]

Duration ( FSecs const &  timeSpan_in_secs)
inline

Definition at line 497 of file timevalue.hpp.

◆ Duration() [5/7]

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.

◆ Duration() [6/7]

Duration ( TimeSpan const &  interval)
inline

Definition at line 806 of file timevalue.hpp.

◆ Duration() [7/7]

Duration ( Duration const &  o)
inline

Definition at line 509 of file timevalue.hpp.

References TimeValue::t_.

Member Function Documentation

◆ operator=()

Duration & operator= ( Duration const &  )
private

direct assignment prohibited

◆ accept()

void accept ( Mutation const &  muta)
inline

Definition at line 122 of file mutation.hpp.

References Mutation::change().

Referenced by Response::globalLength(), TimeMutation_test::mutate_by_Increment(), TimeMutation_test::mutate_by_Offset(), TimeMutation_test::mutate_by_Value(), TimeMutation_test::mutate_quantised(), and Clip::setupLength().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator std::string()

operator std::string ( ) const
explicit

diagnostics

◆ operator-()

Offset operator- ( ) const
inline

Supporting backwards use as offset.

Definition at line 559 of file timevalue.hpp.

Member Data Documentation

◆ NIL

◆ MAX

const Duration MAX
static
Initial value:
= []{
auto maxDelta {Time::MAX - Time::MIN};
return reinterpret_cast<Duration const&> (maxDelta);
}()
Duration is the internal Lumiera time metric.
static const Time MIN
static const Time MAX

maximum possible temporal extension

Definition at line 516 of file timevalue.hpp.

Referenced by QuantiserBasics_test::coverQuantisationCornerCases(), TimeValue::limitedDelta(), ZoomWindow_test::safeguard_extremeOffset(), ZoomWindow_test::safeguard_extremeTimePos(), ZoomWindow_test::safeguard_verySmall(), and TimeValue_test::verify_extremeValues().

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

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