ardour
|
#include <TimeConverter.hpp>
Public Member Functions | |
TimeConverter () | |
TimeConverter (B ob) | |
virtual | ~TimeConverter () |
virtual B | to (A a) const =0 |
virtual A | from (B b) const =0 |
B | origin_b () const |
void | set_origin_b (B o) |
Protected Attributes | |
B | _origin_b |
A bidirectional converter between two different time units.
Think of the conversion method names as if they are written in-between the two template parameters (i.e. "A <name> B").
_origin_b should be the origin for conversion in the units of B. That is, there is some point in time _origin_b, such that:
to() converts a time _origin_b + a into an offset from _origin_b in units of B. from() converts a time _origin_b + b into an offset from _origin_b in units of A.
Definition at line 38 of file TimeConverter.hpp.
|
inline |
Definition at line 40 of file TimeConverter.hpp.
|
inline |
Definition at line 41 of file TimeConverter.hpp.
|
virtual |
Definition at line 29 of file TimeConverter.cpp.
|
pure virtual |
Convert B time to A time (A from B)
Implemented in Evoral::IdentityConverter< A, B >, ARDOUR::DoubleBeatsFramesConverter, and ARDOUR::BeatsFramesConverter.
|
inline |
Definition at line 50 of file TimeConverter.hpp.
|
inline |
Definition at line 54 of file TimeConverter.hpp.
|
pure virtual |
Convert A time to B time (A to B)
Implemented in Evoral::IdentityConverter< A, B >, ARDOUR::DoubleBeatsFramesConverter, and ARDOUR::BeatsFramesConverter.
|
protected |
Definition at line 59 of file TimeConverter.hpp.