summaryrefslogtreecommitdiffabout
path: root/include/midillo/MTrk.h
authorMichael Krelin <hacker@klever.net>2006-08-11 16:01:56 (UTC)
committer Michael Krelin <hacker@klever.net>2006-08-11 16:01:56 (UTC)
commit0c21a7a0d5b84dc6726462f0fbe51b8c32433262 (patch) (side-by-side diff)
tree9df6334cb1a61efebe68f7bcef9aa119a823626a /include/midillo/MTrk.h
parent9bcc235e575a95989a5903394c127accbeef2e0f (diff)
downloadmidillo-0c21a7a0d5b84dc6726462f0fbe51b8c32433262.zip
midillo-0c21a7a0d5b84dc6726462f0fbe51b8c32433262.tar.gz
midillo-0c21a7a0d5b84dc6726462f0fbe51b8c32433262.tar.bz2
initial commit into repository0.0
Diffstat (limited to 'include/midillo/MTrk.h') (more/less context) (show whitespace changes)
-rw-r--r--include/midillo/MTrk.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/include/midillo/MTrk.h b/include/midillo/MTrk.h
new file mode 100644
index 0000000..0884388
--- a/dev/null
+++ b/include/midillo/MTrk.h
@@ -0,0 +1,54 @@
+#ifndef __MIDILLO_MTRK_H
+#define __MIDILLO_MTRK_H
+
+#include <istream>
+#include <ostream>
+#include <list>
+#include <midillo/chunk.h>
+#include <midillo/event.h>
+
+/**
+ * @file
+ * @brief MTrk -- track chunk container
+ */
+
+namespace midillo {
+ using std::istream;
+ using std::ostream;
+
+ /**
+ * MTrk track chunk container class
+ */
+ class MTrk_t : public chunk_t {
+ public:
+ /**
+ * MIDI events contained in the track
+ */
+ events_t events;
+
+ /**
+ * Load MTrk chunk from the stream
+ * @param s input stream
+ */
+ void load(istream& s);
+
+ /**
+ * Save MTrk chunk to the stream
+ * @param s output stream
+ */
+ void save(ostream& s) const;
+
+ /**
+ * Dump textual representation of MTrk chunk to stream
+ * @param s output stream
+ */
+ void dump(ostream& s) const;
+ };
+
+ inline ostream& operator<<(ostream& s,const MTrk_t& mtrk) {
+ mtrk.dump(s); return s;
+ }
+
+}
+
+#endif /* __MIDILLO_MTRK_H */