TracktionEngine
Loading...
Searching...
No Matches
engine::EditTimeRange Struct Reference

Represents a time range in an Edit stored as either time or beats. More...

#include <tracktion_EditTime.h>

Public Member Functions

 EditTimeRange (TimeRange)
 Creates an EditTimeRange from a TimeRange.
 EditTimeRange (TimePosition, TimePosition)
 Creates an EditTimeRange from a TimeRange.
 EditTimeRange (TimePosition, TimeDuration)
 Creates an EditTimeRange from a TimeRange.
 EditTimeRange (BeatRange)
 Creates an EditTimeRange from a BeatRange.
 EditTimeRange (BeatPosition, BeatPosition)
 Creates an EditTimeRange from a BeatRange.
 EditTimeRange (BeatPosition, BeatDuration)
 Creates an EditTimeRange from a BeatRange.
EditPosition getStart () const
 Returns the start of the range.
EditPosition getEnd () const
 Returns the end of the range.
EditDuration getLength () const
 Returns the length of the range.
bool isBeats () const
 Returns true if the time is stored as beats, false if stored as a TimePosition.

Detailed Description

Represents a time range in an Edit stored as either time or beats.

This is basically a variant to simplify APIs that can accept either time base.

Constructor & Destructor Documentation

◆ EditTimeRange() [1/6]

engine::EditTimeRange::EditTimeRange ( TimeRange r)

Creates an EditTimeRange from a TimeRange.

Referenced by toBeats, toBeats, toTime, and toTime.

◆ EditTimeRange() [2/6]

engine::EditTimeRange::EditTimeRange ( TimePosition start,
TimePosition end )

Creates an EditTimeRange from a TimeRange.

◆ EditTimeRange() [3/6]

engine::EditTimeRange::EditTimeRange ( TimePosition start,
TimeDuration length )

Creates an EditTimeRange from a TimeRange.

◆ EditTimeRange() [4/6]

engine::EditTimeRange::EditTimeRange ( BeatRange r)

Creates an EditTimeRange from a BeatRange.

◆ EditTimeRange() [5/6]

engine::EditTimeRange::EditTimeRange ( BeatPosition start,
BeatPosition end )

Creates an EditTimeRange from a BeatRange.

◆ EditTimeRange() [6/6]

engine::EditTimeRange::EditTimeRange ( BeatPosition start,
BeatDuration length )

Creates an EditTimeRange from a BeatRange.

Member Function Documentation

◆ getStart()

EditPosition engine::EditTimeRange::getStart ( ) const

Returns the start of the range.

References isBeats().

Referenced by engine::contains(), engine::containsInclusive(), and engine::toUnderlying().

◆ getEnd()

EditPosition engine::EditTimeRange::getEnd ( ) const

Returns the end of the range.

References isBeats().

Referenced by engine::contains(), engine::containsInclusive(), and engine::toUnderlying().

◆ getLength()

EditDuration engine::EditTimeRange::getLength ( ) const

Returns the length of the range.

References isBeats().

◆ isBeats()

bool engine::EditTimeRange::isBeats ( ) const

Returns true if the time is stored as beats, false if stored as a TimePosition.

Referenced by getEnd(), getLength(), and getStart().


The documentation for this struct was generated from the following file: