Ardour  8.12
midi_automation_list_binder.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010-2011 Carl Hetherington <carl@carlh.net>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef __ardour_midi_automation_list_binder_h__
20 #define __ardour_midi_automation_list_binder_h__
21 
22 #include "pbd/memento_command.h"
23 #include "evoral/Parameter.h"
24 #include "ardour/session.h"
25 
26 namespace ARDOUR {
27 
28 class MidiSource;
29 class AutomationList;
30 
32 class LIBARDOUR_API MidiAutomationListBinder : public MementoCommandBinder<ARDOUR::AutomationList>
33 {
34 public:
37 
38  void set_state (XMLNode const & node , int version) const;
39  XMLNode& get_state () const;
40  std::string type_name() const;
41 
42  void add_state (XMLNode *);
43 
44  void source_died () {
45  std::cerr << "Source died, drop binder\n";
46  /* The source we are binding died, so drop references to ourselves */
47  this->drop_references ();
48  }
49 
50 private:
54 };
55 
56 } // namespace ARDOUR
57 
58 #endif // __ardour_midi_automation_list_binder_h__
MidiAutomationListBinder(ARDOUR::MidiSource &, Evoral::Parameter)
void set_state(XMLNode const &node, int version) const
std::string type_name() const
MidiAutomationListBinder(XMLNode *, ARDOUR::Session::SourceMap const &)
std::map< PBD::ID, std::shared_ptr< Source > > SourceMap
Definition: session.h:2036
Definition: xml++.h:114
#define LIBARDOUR_API