Make (MIDI) event time stamp type a template parameter.

git-svn-id: svn://localhost/ardour2/branches/3.0@4473 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2009-02-02 02:36:05 +00:00
parent ead5dd4568
commit 166ef64e3d
54 changed files with 534 additions and 424 deletions

View file

@ -21,7 +21,8 @@
namespace Evoral {
Note::Note(uint8_t chan, EventTime t, EventLength l, uint8_t n, uint8_t v)
template<typename T>
Note<T>::Note(uint8_t chan, T t, EventLength l, uint8_t n, uint8_t v)
// FIXME: types?
: _on_event(0xDE, t, 3, NULL, true)
, _off_event(0xAD, t + l, 3, NULL, true)
@ -45,7 +46,8 @@ Note::Note(uint8_t chan, EventTime t, EventLength l, uint8_t n, uint8_t v)
}
Note::Note(const Note& copy)
template<typename T>
Note<T>::Note(const Note<T>& copy)
: _on_event(copy._on_event, true)
, _off_event(copy._off_event, true)
{
@ -71,13 +73,15 @@ Note::Note(const Note& copy)
}
Note::~Note()
template<typename T>
Note<T>::~Note()
{
}
const Note&
Note::operator=(const Note& copy)
template<typename T>
const Note<T>&
Note<T>::operator=(const Note<T>& copy)
{
_on_event = copy._on_event;
_off_event = copy._off_event;
@ -93,4 +97,6 @@ Note::operator=(const Note& copy)
return *this;
}
template class Note<double>;
} // namespace Evoral