00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef MIDIDATABUFFER_H_
00024 #define MIDIDATABUFFER_H_
00025
00026 #include "types.h"
00027
00028 namespace MIDI
00029 {
00041 class DataBuffer
00042 {
00043 public:
00045
00048 DataBuffer();
00050 DataBuffer(const DataBuffer& o);
00060 DataBuffer(byte data[],unsigned int size);
00066 DataBuffer(unsigned int maxsize);
00067
00071 byte* data();
00072
00076 unsigned int size();
00077
00081 unsigned int maxsize();
00082
00088 void writeVariableLength(dword data);
00089
00095 void write(byte data);
00096
00104 void write(byte data[],unsigned int size);
00105
00111 void write(DataBuffer data);
00112
00119 void seek(int pos);
00120
00127 void remove(int numBytes);
00128
00129 private:
00130 byte* _data;
00131 unsigned int _size;
00132 unsigned int _maxsize;
00133
00134 unsigned int _pos;
00135 };
00136 }
00137
00138 #endif // MIDIDATABUFFER_H_