1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ 2 3 /* 4 Rosegarden 5 A MIDI and audio sequencer and musical notation editor. 6 Copyright 2000-2021 the Rosegarden development team. 7 8 Other copyrights also apply to some parts of this work. Please 9 see the AUTHORS file and individual file headers for details. 10 11 This program is free software; you can redistribute it and/or 12 modify it under the terms of the GNU General Public License as 13 published by the Free Software Foundation; either version 2 of the 14 License, or (at your option) any later version. See the file 15 COPYING included with this distribution for more information. 16 */ 17 18 #ifndef RG_MAPPEDEVENTINSERTER_H 19 #define RG_MAPPEDEVENTINSERTER_H binind_compute(void)20 21 #include "MappedInserterBase.h" 22 23 namespace Rosegarden 24 { 25 26 class MappedEventList; 27 28 /// Inserts MappedEvent objects into a MappedEventList. 29 /** 30 * This is primarily used by RosegardenSequencer::getSlice() during playback 31 * to generate a MappedEventList to send off to ALSA. 32 * 33 * ??? This inside-out thinking hurts my brain. Can we instead just send 34 * a MappedEventList & to whoever needs to insert things, and let them 35 * call a MappedEventList::insertCopy()? 36 */ 37 class MappedEventInserter : public MappedInserterBase 38 { 39 public: 40 MappedEventInserter(MappedEventList &list) : 41 m_list(list) 42 { } 43 44 /// Inserts an event into the MappedEventList (m_list). 45 void insertCopy(const MappedEvent &evt) override; 46 47 private: 48 MappedEventList &m_list; 49 }; 50 51 } 52 53 #endif /* ifndef RG_MAPPEDEVENTINSERTER_H */ 54