diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-06-02 21:41:35 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-06-02 21:41:35 +0000 |
commit | 449aab3c465bbbf66d221fac3d7ea559f1720357 (patch) | |
tree | 6843cc40c88250a132acac701271f1504cd2df04 /libs/midi++2/midi++/midnam_patch.h | |
parent | 9c0d7d72d70082a54f823cd44c0ccda5da64bb6f (diff) |
rollback to 3428, before the mysterious removal of libs/* at 3431/3432
git-svn-id: svn://localhost/ardour2/branches/3.0@3435 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/midi++2/midi++/midnam_patch.h')
-rw-r--r-- | libs/midi++2/midi++/midnam_patch.h | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/libs/midi++2/midi++/midnam_patch.h b/libs/midi++2/midi++/midnam_patch.h new file mode 100644 index 0000000000..492eacd897 --- /dev/null +++ b/libs/midi++2/midi++/midnam_patch.h @@ -0,0 +1,96 @@ +#ifndef MIDNAM_PATCH_H_ +#define MIDNAM_PATCH_H_ + +#include "pbd/stateful.h" +#include "midi++/event.h" +#include "pbd/xml++.h" + +#include <string> +#include <list> +#include <set> + +namespace MIDI +{ + +namespace Name +{ + +class Patch : public PBD::Stateful +{ +public: + typedef std::list<MIDI::Event> PatchMidiCommands; + + Patch() {}; + Patch(string a_number, string a_name) : _number(a_number), _name(a_name) {}; + ~Patch() {}; + + const string& name() const { return _name; } + void set_name(const string a_name) { _name = a_name; } + + const string& number() const { return _number; } + void set_number(const string a_number) { _number = a_number; } + + const PatchMidiCommands& patch_midi_commands() const { return _patch_midi_commands; } + + XMLNode& get_state (void); + int set_state (const XMLNode& a_node); + +private: + string _number; + string _name; + PatchMidiCommands _patch_midi_commands; +}; + +class PatchBank : public PBD::Stateful +{ +public: + typedef std::list<Patch> PatchNameList; + + PatchBank() {}; + virtual ~PatchBank() {}; + PatchBank(string a_name) : _name(a_name) {}; + + const string& name() const { return _name; } + void set_name(const string a_name) { _name = a_name; } + + const PatchNameList& patch_name_list() const { return _patch_name_list; } + + XMLNode& get_state (void); + int set_state (const XMLNode& a_node); + +private: + string _name; + PatchNameList _patch_name_list; +}; + +class ChannelNameSet : public PBD::Stateful +{ +public: + typedef std::set<uint8_t> AvailableForChannels; + typedef std::list<PatchBank> PatchBanks; + + ChannelNameSet() {}; + virtual ~ChannelNameSet() {}; + ChannelNameSet(string a_name) : _name(a_name) {}; + + const string& name() const { return _name; } + void set_name(const string a_name) { _name = a_name; } + + const AvailableForChannels& available_for_channels() const { return _available_for_channels; } + const PatchBanks& patch_banks() const { return _patch_banks; } + + XMLNode& get_state (void); + int set_state (const XMLNode& a_node); + +private: + string _name; + AvailableForChannels _available_for_channels; + PatchBanks _patch_banks; +}; + + +} + +} + +#endif /*MIDNAM_PATCH_H_*/ |