From 110170db95aa455794cc8d8ca8ed53b8a31119a5 Mon Sep 17 00:00:00 2001 From: Hans Baier Date: Sat, 6 Dec 2008 00:07:07 +0000 Subject: * Added MIDI::Name::Note git-svn-id: svn://localhost/ardour2/branches/3.0@4292 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/midi++2/midnam_patch.cc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'libs/midi++2/midnam_patch.cc') diff --git a/libs/midi++2/midnam_patch.cc b/libs/midi++2/midnam_patch.cc index 624701bcde..dbde6e240c 100644 --- a/libs/midi++2/midnam_patch.cc +++ b/libs/midi++2/midnam_patch.cc @@ -39,6 +39,26 @@ Patch::set_state (const XMLNode& node) return 0; } +XMLNode& +Note::get_state (void) +{ + XMLNode* node = new XMLNode("Patch"); + node->add_property("Number", _number); + node->add_property("Name", _name); + + return *node; +} + +int +Note::set_state (const XMLNode& node) +{ + assert(node.name() == "Patch"); + _number = node.property("Number")->value(); + _name = node.property("Name")->value(); + + return 0; +} + XMLNode& PatchBank::get_state (void) { -- cgit v1.2.3