1 /* This file is part of Evoral.
2 * Copyright (C) 2009 Paul Davis
4 * Evoral is free software; you can redistribute it and/or modify it under the
5 * terms of the GNU General Public License as published by the Free Software
6 * Foundation; either version 2 of the License, or (at your option) any later
9 * Evoral is distributed in the hope that it will be useful, but WITHOUT ANY
10 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 #ifndef EVORAL_EVENT_LIST_HPP
19 #define EVORAL_EVENT_LIST_HPP
23 #include "evoral/visibility.h"
24 #include "evoral/EventSink.hpp"
25 #include "evoral/types.hpp"
26 #include "evoral/Event.hpp"
31 /** A list of events (generic time-stamped binary "blobs").
33 * Used when we need an unsorted list of Events that is also an EventSink. Absolutely nothing more.
35 template<typename Time>
36 class /*LIBEVORAL_API*/ EventList : public std::list<Evoral::Event<Time> *>, public Evoral::EventSink<Time> {
40 uint32_t write(Time time, EventType type, uint32_t size, const uint8_t* buf) {
41 this->push_back(new Evoral::Event<Time>(
42 type, time, size, const_cast<uint8_t*>(buf), true)); // Event copies buffer
50 #endif // EVORAL_EVENT_LIST_HPP