summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Anderson <ardour@semiosix.com>2007-07-20 19:53:11 +0000
committerJohn Anderson <ardour@semiosix.com>2007-07-20 19:53:11 +0000
commit7a14cc049b409dfd9fb504d72451e0f5cbd5d764 (patch)
tree5048534a4e7f44d8ca25bf7a89f167472c92b355
parent423bb906bd0b36d4d5e021cd8f1272ba91a46e4a (diff)
move operator << into midi++ from mackie
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2166 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--libs/midi++2/midi++/port.h3
-rw-r--r--libs/midi++2/midiport.cc18
2 files changed, 21 insertions, 0 deletions
diff --git a/libs/midi++2/midi++/port.h b/libs/midi++2/midi++/port.h
index 0b5e72d81b..e095ce0c64 100644
--- a/libs/midi++2/midi++/port.h
+++ b/libs/midi++2/midi++/port.h
@@ -20,6 +20,7 @@
#define __libmidi_port_h__
#include <string>
+#include <iostream>
#include <sigc++/sigc++.h>
@@ -143,6 +144,8 @@ class Port : public sigc::trackable {
static size_t nports;
};
+std::ostream & operator << ( std::ostream & os, const Port & port );
+
} // namespace MIDI
#endif // __libmidi_port_h__
diff --git a/libs/midi++2/midiport.cc b/libs/midi++2/midiport.cc
index a4b28ce461..f881e3ed23 100644
--- a/libs/midi++2/midiport.cc
+++ b/libs/midi++2/midiport.cc
@@ -145,3 +145,21 @@ Port::write_callback (byte *msg, unsigned int len, void *ptr)
((Port *)ptr)->write (msg, len);
}
+std::ostream & MIDI::operator << ( std::ostream & os, const MIDI::Port & port )
+{
+ using namespace std;
+ os << "MIDI::Port { ";
+ os << "device: " << port.device();
+ os << "; ";
+ os << "name: " << port.name();
+ os << "; ";
+ os << "type: " << port.type();
+ os << "; ";
+ os << "mode: " << port.mode();
+ os << "; ";
+ os << "ok: " << port.ok();
+ os << "; ";
+ os << " }";
+ return os;
+}
+