Ardour  9.0-pre0-582-g084a23a80d
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 #pragma once
20 
21 #include "pbd/memento_command.h"
22 #include "evoral/Parameter.h"
23 #include "ardour/session.h"
24 
25 namespace ARDOUR {
26 
27 class MidiSource;
28 class AutomationList;
29 
31 class LIBARDOUR_API MidiAutomationListBinder : public MementoCommandBinder<ARDOUR::AutomationList>
32 {
33 public:
36 
37  void set_state (XMLNode const & node , int version) const;
38  XMLNode& get_state () const;
39  std::string type_name() const;
40 
41  void add_state (XMLNode *);
42 
43  void source_died () {
44  std::cerr << "Source died, drop binder\n";
45  /* The source we are binding died, so drop references to ourselves */
46  this->drop_references ();
47  }
48 
49 private:
53 };
54 
55 } // namespace ARDOUR
56 
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:1972
Definition: xml++.h:114
#define LIBARDOUR_API