00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef LEMUR_WRITEBUFFER_HPP
00020 #define LEMUR_WRITEBUFFER_HPP
00021
00022 #include "File.hpp"
00025 class WriteBuffer {
00026 private:
00027 char* _buffer;
00028 int _bufferSize;
00029 File& _file;
00030 int _position;
00031 File::offset_type _filePos;
00032
00033 public:
00034 WriteBuffer( File& file, int bufferSize );
00035 ~WriteBuffer();
00036
00040 void write( const char* data, int length );
00041
00045 void flush();
00046
00049 File::offset_type tellp() const;
00050 };
00051
00052 #endif // LEMUR_WRITEBUFFER_HPP