Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
FrameNr Class Reference

#include "lib/time/timecode.hpp"

Description

A frame counting timecode value.

This is the hard-coded standard representation of format::Frames, and is defined such as to make FrameNr values interchangeable with integral numbers. Like any concrete TCode subclass, it can be created based on a QuTime value. This way, not only the (raw) TimeValue is provided, but also the (frame)-Grid to base the frame count on. But contrary to a QuTime value, a FrameNr value is materialised (rounded) into a definite integral number, stripping the excess precision contained in the original (raw) TimeValue. As framecount values are implemented as single display field for an integral value (time::Digxel), they allow for simple presentation.

Definition at line 96 of file timecode.hpp.

Public Types

using Format = format::Frames
 

Static Public Member Functions

static FrameCnt quant (Time const &, Symbol gridID)
 convenience shortcut: time grid to frame number
 

Public Member Functions

 FrameNr (QuTime const &quantisedTime)
 
- Public Member Functions inherited from TCode
virtual ~TCode ()
 
 operator string () const
 
string describe () const
 
Time getTime () const
 
- Public Member Functions inherited from Digxel< NUM, FMT >
template<typename FUN , class THIS >
void installMutator (FUN mutate, THIS &self)
 install an external functor to be applied on any new digxel value.
 
 Digxel ()
 
 operator NUM () const
 
 operator string () const
 
size_t maxlen () const
 
digxel::CBuf show () const
 
void operator= (NUM n)
 
void setValueRaw (NUM newVal)
 
Digxeloperator+= (NUM inc)
 
Digxeloperator-= (NUM dec)
 
Digxeloperator++ ()
 
Digxeloperator-- ()
 
NUM operator++ (int)
 
NUM operator-- (int)
 
auto operator<=> (Digxel const &o) const
 
bool operator== (Digxel const &o) const
 

Private Member Functions

string show () const
 
Literal tcID () const
 
TimeValue value () const
 

Additional Inherited Members

- Protected Member Functions inherited from TCode
 TCode (PQuant const &quant)
 
- Protected Attributes inherited from TCode
PQuant quantiser_
 

Constructor & Destructor Documentation

◆ FrameNr()

FrameNr ( QuTime const &  quantisedTime)

Definition at line 294 of file timecode.cpp.

References QuTime::castInto().

+ Here is the call graph for this function:

Member Typedef Documentation

◆ Format

Definition at line 106 of file timecode.hpp.

Member Function Documentation

◆ show()

string show ( ) const
inlineprivatevirtual

Implements TCode.

Definition at line 101 of file timecode.hpp.

References Digxel< NUM, FMT >::show().

+ Here is the call graph for this function:

◆ tcID()

Literal tcID ( ) const
inlineprivatevirtual

Implements TCode.

Definition at line 102 of file timecode.hpp.

◆ value()

TimeValue value ( ) const
inlineprivatevirtual

Implements TCode.

Definition at line 103 of file timecode.hpp.

References Frames::evaluate(), and TCode::quantiser_.

+ Here is the call graph for this function:

◆ quant()

FrameCnt quant ( Time const &  time,
Symbol  gridID 
)
static

convenience shortcut: time grid to frame number

Remarks
Handles the common case to determine the frame number relative to some time grid. The regular path for this conversion would be to have a quantiser for this grid, to construct a QuTime and then a FrameNr instance based on this QuTime. Assuming that the grid is actually well-known and was registered via Advice-System with a symbolic ID, the quantiser can directly be retrieved and applied to convert.

Definition at line 110 of file common-services.cpp.

References Quantiser::retrieve().

Referenced by NodeBuilder_test::build_Node_closedParam(), NodeBuilder_test::build_Node_dynamicParam(), NodeFeed_test::feedParamNode(), and NodeLink_test::trigger_node_port_invocation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:
+ Inheritance diagram for FrameNr:
+ Collaboration diagram for FrameNr:

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