ardour
Public Member Functions | Protected Attributes | List of all members
Evoral::TimeConverter< A, B > Class Template Referenceabstract

#include <TimeConverter.hpp>

Inheritance diagram for Evoral::TimeConverter< A, B >:
Evoral::IdentityConverter< A, B >

Public Member Functions

 TimeConverter ()
 
 TimeConverter (B ob)
 
virtual ~TimeConverter ()
 
virtual B to (A a) const =0
 
virtual A from (B b) const =0
 
origin_b () const
 
void set_origin_b (B o)
 

Protected Attributes

_origin_b
 

Detailed Description

template<typename A, typename B>
class Evoral::TimeConverter< A, 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.

Constructor & Destructor Documentation

template<typename A, typename B>
Evoral::TimeConverter< A, B >::TimeConverter ( )
inline

Definition at line 40 of file TimeConverter.hpp.

template<typename A, typename B>
Evoral::TimeConverter< A, B >::TimeConverter ( ob)
inline

Definition at line 41 of file TimeConverter.hpp.

template<typename A , typename B >
Evoral::TimeConverter< A, B >::~TimeConverter ( )
virtual

Definition at line 29 of file TimeConverter.cpp.

Member Function Documentation

template<typename A, typename B>
virtual A Evoral::TimeConverter< A, B >::from ( b) const
pure virtual
template<typename A, typename B>
B Evoral::TimeConverter< A, B >::origin_b ( ) const
inline

Definition at line 50 of file TimeConverter.hpp.

template<typename A, typename B>
void Evoral::TimeConverter< A, B >::set_origin_b ( o)
inline

Definition at line 54 of file TimeConverter.hpp.

template<typename A, typename B>
virtual B Evoral::TimeConverter< A, B >::to ( a) const
pure virtual

Member Data Documentation

template<typename A, typename B>
B Evoral::TimeConverter< A, B >::_origin_b
protected

Definition at line 59 of file TimeConverter.hpp.


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