remove unnecessary files from native audio backend
[ardour.git] / libs / backends / wavesaudio / waves_midi_buffer.cc
1 /*\r
2     Copyright (C) 2014 Waves Audio Ltd.\r
3 \r
4     This program is free software; you can redistribute it and/or modify\r
5     it under the terms of the GNU General Public License as published by\r
6     the Free Software Foundation; either version 2 of the License, or\r
7     (at your option) any later version.\r
8 \r
9     This program is distributed in the hope that it will be useful,\r
10     but WITHOUT ANY WARRANTY; without even the implied warranty of\r
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
12     GNU General Public License for more details.\r
13 \r
14     You should have received a copy of the GNU General Public License\r
15     along with this program; if not, write to the Free Software\r
16     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r
17 \r
18 */\r
19 \r
20 #include "waves_midi_buffer.h"\r
21 #include "waves_midi_event.h"\r
22 \r
23 using namespace ARDOUR;\r
24 \r
25 WavesMidiBuffer::WavesMidiBuffer (std::string name)\r
26     : std::vector<WavesMidiEvent*> ()\r
27     , _name (name)\r
28 {\r
29 }\r
30 \r
31 WavesMidiBuffer::~WavesMidiBuffer ()\r
32 {\r
33     clear ();\r
34 }\r
35 \r
36 void WavesMidiBuffer::clear ()\r
37 {\r
38     for (WavesMidiBufferIterator it = begin (); it !=  end (); ++it)\r
39         delete *it;\r
40 \r
41     std::vector<WavesMidiEvent*>::clear ();\r
42 }\r
43 \r
44 WavesMidiBuffer& WavesMidiBuffer::operator += (const WavesMidiBuffer& source)\r
45 {\r
46     for (WavesMidiBufferConstIterator it = source.begin (); it !=  source.end (); ++it) {\r
47         push_back (new WavesMidiEvent (**it));\r
48     }\r
49     return *this;\r
50 }\r