DataInputStream.h

00001 #ifndef gridripper_io_DataInputStream_h
00002 #define gridripper_io_DataInputStream_h
00003 
00004 #include <iostream>
00005 #include "IOException.h"
00006 
00007 namespace gridripper { namespace io {
00008 
00009 using namespace std;
00010 
00018 class DataInputStream
00019 {
00020 private:
00021     istream& in;
00022 
00023 public:
00024     DataInputStream(istream& is): in(is) { }
00025 
00026     string readString() throw(IOException&);
00027 
00028     unsigned int readUnsignedInt() throw(IOException&);
00029 
00030     int readInt() throw(IOException&) {
00031         return (int)readUnsignedInt();
00032     }
00033 
00034     unsigned short readUnsignedShort() throw(IOException&);
00035 
00036     short readShort() throw(IOException&) {
00037         return (short)readUnsignedShort();
00038     }
00039 
00040     float readFloat() throw(IOException&);
00041 
00042     double readDouble() throw(IOException&);
00043 
00044     int skipBytes(int n) throw(IOException&);
00045 };
00046 
00047 } } // namespace gridripper::io
00048 
00049 #endif /* gridripper_io_DataInputStream_h */

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