Ardour  9.0-pre0-582-g084a23a80d
Temporal::timepos_t Class Reference

#include <timeline.h>

Inheritance diagram for Temporal::timepos_t:
[legend]

Public Member Functions

 timepos_t ()
 
 timepos_t (TimeDomain d)
 
 timepos_t (samplepos_t s)
 
 timepos_t (Temporal::Beats const &b)
 
 timepos_t (timecnt_t const &)
 
bool is_beats () const
 
bool is_superclock () const
 
bool is_positive () const
 
bool is_negative () const
 
bool is_zero () const
 
bool operator! () const
 
Temporal::TimeDomain time_domain () const
 
void set_time_domain (Temporal::TimeDomain)
 
superclock_t superclocks () const
 
int64_t samples () const
 
int64_t ticks () const
 
Beats beats () const
 
timepos_toperator= (timecnt_t const &t)
 
timepos_toperator= (Beats const &b)
 
timepos_toperator= (samplepos_t const &s)
 
timepos_t operator- () const
 
bool operator== (timepos_t const &other) const
 
bool operator!= (timepos_t const &other) const
 
bool operator< (timecnt_t const &other) const
 
bool operator> (timecnt_t const &other) const
 
bool operator<= (timecnt_t const &other) const
 
bool operator>= (timecnt_t const &other) const
 
bool operator< (timepos_t const &other) const
 
bool operator> (timepos_t const &other) const
 
bool operator<= (timepos_t const &other) const
 
bool operator>= (timepos_t const &other) const
 
timepos_t operator+ (timecnt_t const &d) const
 
timepos_t operator+ (timepos_t const &d) const
 
timecnt_t distance (timepos_t const &p) const
 
timepos_t earlier (timepos_t const &d) const
 
timepos_t earlier (timecnt_t const &d) const
 
timepos_t earlier (BBT_Offset const &d) const
 
timepos_tshift_earlier (timepos_t const &d)
 
timepos_tshift_earlier (timecnt_t const &d)
 
timepos_tshift_earlier (Temporal::BBT_Offset const &)
 
timepos_t decrement () const
 
timepos_t increment () const
 
timepos_toperator+= (timecnt_t const &d)
 
timepos_toperator+= (timepos_t const &d)
 
timepos_toperator+= (Temporal::BBT_Offset const &)
 
timepos_t scale (ratio_t const &n) const
 
bool operator< (samplepos_t s)
 
bool operator< (Temporal::Beats const &b)
 
bool operator<= (samplepos_t s)
 
bool operator<= (Temporal::Beats const &b)
 
bool operator> (samplepos_t s)
 
bool operator> (Temporal::Beats const &b)
 
bool operator>= (samplepos_t s)
 
bool operator>= (Temporal::Beats const &b)
 
bool operator== (samplepos_t s)
 
bool operator== (Temporal::Beats const &b)
 
bool operator!= (samplepos_t s)
 
bool operator!= (Temporal::Beats const &b)
 
bool string_to (std::string const &str)
 
std::string str () const
 
- Public Member Functions inherited from int62_t
 int62_t ()
 
 int62_t (bool bc, int64_t vc)
 
 int62_t (int62_t const &other)
 
bool flagged () const
 
int64_t val () const
 
int62_toperator= (int64_t n)
 
int62_toperator= (int62_t const &other)
 
int62_t operator- () const
 
int62_t operator+ (int64_t n) const
 
int62_t operator- (int64_t n) const
 
int62_t operator* (int64_t n) const
 
int62_t operator/ (int64_t n) const
 
int62_t operator% (int64_t n) const
 
int62_t operator+ (int62_t n) const
 
int62_t operator- (int62_t n) const
 
int62_t operator* (int62_t n) const
 
int62_t operator/ (int62_t n) const
 
int62_t operator% (int62_t n) const
 
bool operator< (int62_t const &other) const
 
bool operator<= (int62_t const &other) const
 
bool operator> (int62_t const &other) const
 
bool operator>= (int62_t const &other) const
 
bool operator!= (int62_t const &other) const
 
bool operator== (int62_t const &other) const
 
 operator int64_t () const
 
bool operator< (int64_t n) const
 
bool operator<= (int64_t n) const
 
bool operator> (int64_t n) const
 
bool operator>= (int64_t n) const
 
bool operator!= (int64_t n) const
 
bool operator== (int64_t n) const
 
int62_t abs () const
 
int62_toperator+= (int64_t n)
 
int62_toperator-= (int64_t n)
 
int62_toperator*= (int64_t n)
 
int62_toperator/= (int64_t n)
 
int62_toperator%= (int64_t n)
 
int62_toperator+= (int62_t n)
 
int62_toperator-= (int62_t n)
 
int62_toperator*= (int62_t n)
 
int62_toperator/= (int62_t n)
 
int62_toperator%= (int62_t n)
 

Static Public Member Functions

static timepos_t from_superclock (superclock_t s)
 
static timepos_t from_ticks (int64_t t)
 
static timepos_t zero (bool is_beats)
 
static timepos_t max (TimeDomain td)
 
static timepos_t smallest_step (TimeDomain td)
 
- Static Public Member Functions inherited from int62_t
static int64_t build (bool flag, int64_t v)
 

Private Member Functions

 timepos_t (bool b, int64_t v)
 
 timepos_t (int62_t const &v)
 
superclock_t _superclocks () const
 
int64_t _ticks () const
 
Beats _beats () const
 
bool expensive_lt (timepos_t const &) const
 
bool expensive_lte (timepos_t const &) const
 
bool expensive_gt (timepos_t const &) const
 
bool expensive_gte (timepos_t const &) const
 
bool expensive_lt (timecnt_t const &) const
 
bool expensive_lte (timecnt_t const &) const
 
bool expensive_gt (timecnt_t const &) const
 
bool expensive_gte (timecnt_t const &) const
 
timecnt_t expensive_distance (timepos_t const &p) const
 
timepos_t expensive_add (timepos_t const &s) const
 
int62_t operator- (int62_t) const
 
int62_t operator- (int64_t) const
 
int62_toperator-= (int64_t n)
 
int62_toperator-= (int62_t n)
 

Additional Inherited Members

- Static Public Attributes inherited from int62_t
static const int64_t max = 4611686018427387903
 
static const int64_t min = -2305843009213693952
 
- Static Protected Member Functions inherited from int62_t
static int64_t int62 (int64_t v)
 
static bool flagged (int64_t v)
 
- Protected Attributes inherited from int62_t
std::atomic< int64_t > v
 
- Static Protected Attributes inherited from int62_t
static const int64_t flagbit_mask = (1LL<<62)
 

Detailed Description

Definition at line 55 of file timeline.h.

Constructor & Destructor Documentation

◆ timepos_t() [1/7]

Temporal::timepos_t::timepos_t ( )
inline

Definition at line 57 of file timeline.h.

◆ timepos_t() [2/7]

Temporal::timepos_t::timepos_t ( TimeDomain  d)
inline

Definition at line 58 of file timeline.h.

◆ timepos_t() [3/7]

Temporal::timepos_t::timepos_t ( samplepos_t  s)
explicit

◆ timepos_t() [4/7]

Temporal::timepos_t::timepos_t ( Temporal::Beats const &  b)
inlineexplicit

Definition at line 63 of file timeline.h.

◆ timepos_t() [5/7]

Temporal::timepos_t::timepos_t ( timecnt_t const &  )
explicit

◆ timepos_t() [6/7]

Temporal::timepos_t::timepos_t ( bool  b,
int64_t  v 
)
inlineexplicitprivate

Definition at line 246 of file timeline.h.

◆ timepos_t() [7/7]

Temporal::timepos_t::timepos_t ( int62_t const &  v)
inlineexplicitprivate

Definition at line 247 of file timeline.h.

Member Function Documentation

◆ _beats()

Beats Temporal::timepos_t::_beats ( ) const
private

◆ _superclocks()

superclock_t Temporal::timepos_t::_superclocks ( ) const
private

◆ _ticks()

int64_t Temporal::timepos_t::_ticks ( ) const
private

◆ beats()

Beats Temporal::timepos_t::beats ( ) const
inline

Definition at line 92 of file timeline.h.

◆ decrement()

timepos_t Temporal::timepos_t::decrement ( ) const
inline

Definition at line 192 of file timeline.h.

◆ distance()

timecnt_t Temporal::timepos_t::distance ( timepos_t const &  p) const

Compute the distance between this timepos_t and p such that: this + distance = p

This means that if p is later than this, distance is positive; if p is earlier than this, distance is negative.

Note that the return value is a timecnt_t whose position member is equal to the value of this. That means if the distance uses musical time value, the distance may not have constant value at other positions on the timeline.

Returns
this - p

◆ earlier() [1/3]

timepos_t Temporal::timepos_t::earlier ( BBT_Offset const &  d) const

◆ earlier() [2/3]

timepos_t Temporal::timepos_t::earlier ( timecnt_t const &  d) const

◆ earlier() [3/3]

timepos_t Temporal::timepos_t::earlier ( timepos_t const &  d) const

◆ expensive_add()

timepos_t Temporal::timepos_t::expensive_add ( timepos_t const &  s) const
private

◆ expensive_distance()

timecnt_t Temporal::timepos_t::expensive_distance ( timepos_t const &  p) const
private

◆ expensive_gt() [1/2]

bool Temporal::timepos_t::expensive_gt ( timecnt_t const &  ) const
private

◆ expensive_gt() [2/2]

bool Temporal::timepos_t::expensive_gt ( timepos_t const &  ) const
private

◆ expensive_gte() [1/2]

bool Temporal::timepos_t::expensive_gte ( timecnt_t const &  ) const
private

◆ expensive_gte() [2/2]

bool Temporal::timepos_t::expensive_gte ( timepos_t const &  ) const
private

◆ expensive_lt() [1/2]

bool Temporal::timepos_t::expensive_lt ( timecnt_t const &  ) const
private

◆ expensive_lt() [2/2]

bool Temporal::timepos_t::expensive_lt ( timepos_t const &  ) const
private

◆ expensive_lte() [1/2]

bool Temporal::timepos_t::expensive_lte ( timecnt_t const &  ) const
private

◆ expensive_lte() [2/2]

bool Temporal::timepos_t::expensive_lte ( timepos_t const &  ) const
private

◆ from_superclock()

static timepos_t Temporal::timepos_t::from_superclock ( superclock_t  s)
inlinestatic

Definition at line 73 of file timeline.h.

◆ from_ticks()

static timepos_t Temporal::timepos_t::from_ticks ( int64_t  t)
inlinestatic

Definition at line 74 of file timeline.h.

◆ increment()

timepos_t Temporal::timepos_t::increment ( ) const
inline

Definition at line 200 of file timeline.h.

◆ is_beats()

bool Temporal::timepos_t::is_beats ( ) const
inline

Definition at line 78 of file timeline.h.

◆ is_negative()

bool Temporal::timepos_t::is_negative ( ) const
inline

Definition at line 82 of file timeline.h.

◆ is_positive()

bool Temporal::timepos_t::is_positive ( ) const
inline

Definition at line 81 of file timeline.h.

◆ is_superclock()

bool Temporal::timepos_t::is_superclock ( ) const
inline

Definition at line 79 of file timeline.h.

◆ is_zero()

bool Temporal::timepos_t::is_zero ( ) const
inline

Definition at line 83 of file timeline.h.

◆ max()

static timepos_t Temporal::timepos_t::max ( TimeDomain  td)
inlinestatic

Definition at line 239 of file timeline.h.

◆ operator!()

bool Temporal::timepos_t::operator! ( ) const
inline

Definition at line 84 of file timeline.h.

◆ operator!=() [1/3]

Definition at line 230 of file timeline.h.

◆ operator!=() [2/3]

bool Temporal::timepos_t::operator!= ( Temporal::Beats const &  b)
inline

Definition at line 231 of file timeline.h.

◆ operator!=() [3/3]

bool Temporal::timepos_t::operator!= ( timepos_t const &  other) const
inline

Definition at line 102 of file timeline.h.

◆ operator+() [1/2]

timepos_t Temporal::timepos_t::operator+ ( timecnt_t const &  d) const

◆ operator+() [2/2]

timepos_t Temporal::timepos_t::operator+ ( timepos_t const &  d) const
inline

Definition at line 116 of file timeline.h.

◆ operator+=() [1/3]

timepos_t& Temporal::timepos_t::operator+= ( Temporal::BBT_Offset const &  )

◆ operator+=() [2/3]

timepos_t& Temporal::timepos_t::operator+= ( timecnt_t const &  d)

◆ operator+=() [3/3]

timepos_t& Temporal::timepos_t::operator+= ( timepos_t const &  d)

◆ operator-() [1/3]

timepos_t Temporal::timepos_t::operator- ( ) const
inline

Definition at line 98 of file timeline.h.

◆ operator-() [2/3]

int62_t Temporal::timepos_t::operator- ( int62_t  ) const
inlineprivate

Definition at line 274 of file timeline.h.

◆ operator-() [3/3]

int62_t Temporal::timepos_t::operator- ( int64_t  ) const
inlineprivate

Definition at line 275 of file timeline.h.

◆ operator-=() [1/2]

int62_t& int62_t::operator-=
inlineprivate

Definition at line 186 of file int62.h.

◆ operator-=() [2/2]

int62_t& int62_t::operator-=
inlineprivate

Definition at line 145 of file int62.h.

◆ operator<() [1/4]

bool Temporal::timepos_t::operator< ( samplepos_t  s)
inline

Definition at line 220 of file timeline.h.

◆ operator<() [2/4]

bool Temporal::timepos_t::operator< ( Temporal::Beats const &  b)
inline

Definition at line 221 of file timeline.h.

◆ operator<() [3/4]

bool Temporal::timepos_t::operator< ( timecnt_t const &  other) const

◆ operator<() [4/4]

bool Temporal::timepos_t::operator< ( timepos_t const &  other) const
inline

Definition at line 110 of file timeline.h.

◆ operator<=() [1/4]

bool Temporal::timepos_t::operator<= ( samplepos_t  s)
inline

Definition at line 222 of file timeline.h.

◆ operator<=() [2/4]

bool Temporal::timepos_t::operator<= ( Temporal::Beats const &  b)
inline

Definition at line 223 of file timeline.h.

◆ operator<=() [3/4]

bool Temporal::timepos_t::operator<= ( timecnt_t const &  other) const

◆ operator<=() [4/4]

bool Temporal::timepos_t::operator<= ( timepos_t const &  other) const
inline

Definition at line 112 of file timeline.h.

◆ operator=() [1/3]

timepos_t& Temporal::timepos_t::operator= ( Beats const &  b)
inline

Definition at line 95 of file timeline.h.

◆ operator=() [2/3]

timepos_t& Temporal::timepos_t::operator= ( samplepos_t const &  s)
inline

Definition at line 96 of file timeline.h.

◆ operator=() [3/3]

timepos_t& Temporal::timepos_t::operator= ( timecnt_t const &  t)

◆ operator==() [1/3]

bool Temporal::timepos_t::operator== ( samplepos_t  s)
inline

Definition at line 228 of file timeline.h.

◆ operator==() [2/3]

bool Temporal::timepos_t::operator== ( Temporal::Beats const &  b)
inline

Definition at line 229 of file timeline.h.

◆ operator==() [3/3]

bool Temporal::timepos_t::operator== ( timepos_t const &  other) const
inline

Definition at line 101 of file timeline.h.

◆ operator>() [1/4]

bool Temporal::timepos_t::operator> ( samplepos_t  s)
inline

Definition at line 224 of file timeline.h.

◆ operator>() [2/4]

bool Temporal::timepos_t::operator> ( Temporal::Beats const &  b)
inline

Definition at line 225 of file timeline.h.

◆ operator>() [3/4]

bool Temporal::timepos_t::operator> ( timecnt_t const &  other) const

◆ operator>() [4/4]

bool Temporal::timepos_t::operator> ( timepos_t const &  other) const
inline

Definition at line 111 of file timeline.h.

◆ operator>=() [1/4]

bool Temporal::timepos_t::operator>= ( samplepos_t  s)
inline

Definition at line 226 of file timeline.h.

◆ operator>=() [2/4]

bool Temporal::timepos_t::operator>= ( Temporal::Beats const &  b)
inline

Definition at line 227 of file timeline.h.

◆ operator>=() [3/4]

bool Temporal::timepos_t::operator>= ( timecnt_t const &  other) const

◆ operator>=() [4/4]

bool Temporal::timepos_t::operator>= ( timepos_t const &  other) const
inline

Definition at line 113 of file timeline.h.

◆ samples()

int64_t Temporal::timepos_t::samples ( ) const
inline

Definition at line 90 of file timeline.h.

◆ scale()

timepos_t Temporal::timepos_t::scale ( ratio_t const &  n) const

◆ set_time_domain()

void Temporal::timepos_t::set_time_domain ( Temporal::TimeDomain  )

◆ shift_earlier() [1/3]

timepos_t& Temporal::timepos_t::shift_earlier ( Temporal::BBT_Offset const &  )

◆ shift_earlier() [2/3]

timepos_t& Temporal::timepos_t::shift_earlier ( timecnt_t const &  d)

◆ shift_earlier() [3/3]

timepos_t& Temporal::timepos_t::shift_earlier ( timepos_t const &  d)

◆ smallest_step()

static timepos_t Temporal::timepos_t::smallest_step ( TimeDomain  td)
inlinestatic

Definition at line 240 of file timeline.h.

◆ str()

std::string Temporal::timepos_t::str ( ) const

◆ string_to()

bool Temporal::timepos_t::string_to ( std::string const &  str)

◆ superclocks()

superclock_t Temporal::timepos_t::superclocks ( ) const
inline

Definition at line 89 of file timeline.h.

◆ ticks()

int64_t Temporal::timepos_t::ticks ( ) const
inline

Definition at line 91 of file timeline.h.

◆ time_domain()

Temporal::TimeDomain Temporal::timepos_t::time_domain ( ) const
inline

Definition at line 86 of file timeline.h.

◆ zero()

static timepos_t Temporal::timepos_t::zero ( bool  is_beats)
inlinestatic

Definition at line 76 of file timeline.h.


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