notearray.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef NOTEARRAY_H
00025 #define NOTEARRAY_H
00026
00027 #include <libkmid/dattypes.h>
00028 #include <kdelibs_export.h>
00029
00038 class KMID_EXPORT NoteArray
00039 {
00040 private:
00041 class NoteArrayPrivate;
00042 NoteArrayPrivate *d;
00043
00044 public:
00045 struct noteCmd {
00049 ulong ms;
00050
00054 int chn;
00055
00059 int cmd;
00060
00066 int note;
00067 };
00068
00069 private:
00070 noteCmd *data;
00071 ulong totalAllocated;
00072
00073 ulong last;
00074 noteCmd *lastAdded;
00075
00080 noteCmd *it;
00081
00082 noteCmd *pointerTo(ulong pos);
00083
00084 public:
00088 NoteArray(void);
00092 ~NoteArray();
00093
00100 void at(ulong pos, ulong ms,int chn,int cmd,int note);
00101
00106 void at(ulong pos, noteCmd s);
00107
00111 noteCmd at(int pos);
00112
00118 void add(ulong ms,int chn,int cmd,int note);
00119
00126 void iteratorBegin(void) { it=data; }
00127
00131 noteCmd *get(void) { return it; }
00132
00136 void next(void);
00137
00142 void moveIteratorTo(ulong ms,int *pgm=NULL);
00143 };
00144
00145 #endif
|