Clean up State API:

* Processor implement get_state(), classes derived from Processor
  implement protected ::state() -- as documented in processor.h
* likewise for Route, Track: make ::state() a protected interface
* removal of "full_state", use explicit "template_save"
* use RAII/Unwind to skip saving automation-state
This commit is contained in:
Robin Gareus 2017-10-04 00:35:29 +02:00
parent 5dd9acf9ab
commit e31f5d9998
58 changed files with 197 additions and 218 deletions

View file

@ -106,15 +106,15 @@ IOProcessor::set_output (boost::shared_ptr<IO> io)
}
XMLNode&
IOProcessor::state (bool full_state)
IOProcessor::state ()
{
XMLNode& node (Processor::state (full_state));
XMLNode& node (Processor::state ());
node.set_property ("own-input", _own_input);
if (_input) {
if (_own_input) {
XMLNode& i (_input->state (full_state));
XMLNode& i (_input->get_state ());
// i.name() = X_("output");
node.add_child_nocopy (i);
} else {
@ -126,7 +126,7 @@ IOProcessor::state (bool full_state)
if (_output) {
if (_own_output) {
XMLNode& o (_output->state (full_state));
XMLNode& o (_output->get_state ());
node.add_child_nocopy (o);
} else {
node.set_property ("output", _output->name ());