DataOutputStream.h

00001 #ifndef gridripper_io_DataOutputStream_h
00002 #define gridripper_io_DataOutputStream_h
00003 
00004 #include <iostream>
00005 #include "IOException.h"
00006 
00007 namespace gridripper { namespace io {
00008 
00009 using namespace std;
00010 
00018 class DataOutputStream
00019 {
00020 private:
00021     ostream& out;
00022 
00023 public:
00024     DataOutputStream(ostream& os): out(os) { }
00025 
00030     void writeByte(int b) throw(IOException&);
00031 
00037     void writeString(const string& s) throw(IOException&);
00038 
00043     void writeUnsignedInt(unsigned int v) throw(IOException&);
00044 
00049     void writeInt(int v) throw(IOException&) {
00050         writeUnsignedInt((unsigned int)v);
00051     }
00052 
00057     void writeUnsignedShort(unsigned short v) throw(IOException&);
00058 
00063     void writeShort(short v) throw(IOException&) {
00064         writeUnsignedShort((unsigned short)v);
00065     }
00066 
00071     void writeFloat(float v) throw(IOException&);
00072 
00077     void writeDouble(double v) throw(IOException&);
00078 
00080     void flush() throw(IOException&);
00081 };
00082 
00083 } } // namespace gridripper::io
00084 
00085 #endif /* gridripper_io_DataOutputStream_h */

Generated on Wed Jun 17 18:46:47 2009 for GridRipper by  doxygen 1.5.6