Lumiera  0.pre.03
»edityourfreedom«
Time Class Reference

#include "lib/time/timevalue.hpp"

Description

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 226 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 More...
 
TimeVar operator- (TimeValue const &tval) const
 
TimeVar operator- () const
 
- Public Member Functions inherited from TimeValue
 TimeValue (gavl_time_t val=0)
 
 TimeValue (TimeValue const &o)
 copy initialisation allowed More...
 
 operator std::string () const
 

Static Public Attributes

static const Time ANYTIME
 border condition marker value. ANYTIME <= any time value More...
 
static const Time MAX
 
static const Time MIN
 
static const Time NEVER
 border condition marker value. NEVER >= any time value More...
 
static const Time ZERO
 

Private Member Functions

 Time (int)
 suppress possible direct conversions More...
 
Timeoperator= (Time const)
 direct assignment prohibited More...
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ Time() [1/5]

Time ( int  )
private

suppress possible direct conversions

◆ Time() [2/5]

Time ( TimeValue const &  val = TimeValue(0))
inlineexplicit

Definition at line 244 of file timevalue.hpp.

◆ Time() [3/5]

Time ( TimeVar const &  calcResult)
inline

Definition at line 248 of file timevalue.hpp.

◆ Time() [4/5]

Time ( FSecs const &  fractionalSeconds)
explicit

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 119 of file time.cpp.

References GAVL_TIME_SCALE_MS, lumiera_tmpbuf_print_time(), and TimeValue::t_.

+ Here is the call graph for this function:

◆ Time() [5/5]

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.

Warning
internal Lumiera time values refer to an implementation dependent time origin/scale. The given value will be used as-is, without any further adjustments.

Definition at line 106 of file time.cpp.

Member Function Documentation

◆ operator=()

Time& operator= ( Time  const)
private

direct assignment prohibited

◆ operator std::string()

operator std::string ( ) const

diagnostics

◆ operator+()

TimeVar operator+ ( TimeValue const &  tval) const
inline

convenience start for time calculations

Definition at line 265 of file timevalue.hpp.

◆ operator-() [1/2]

TimeVar operator- ( TimeValue const &  tval) const
inline

Definition at line 266 of file timevalue.hpp.

◆ operator-() [2/2]

TimeVar operator- ( ) const
inline

Definition at line 267 of file timevalue.hpp.

Member Data Documentation

◆ MAX

◆ MIN

◆ ZERO

◆ ANYTIME

const Time ANYTIME
static

border condition marker value. ANYTIME <= any time value

Definition at line 240 of file timevalue.hpp.

Referenced by Timings::constantFrameTimingsInterval(), and TrackingInMemoryBlockSequence::isTimely().

◆ NEVER

const Time NEVER
static
+ Inheritance diagram for Time:
+ Collaboration diagram for Time:

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