00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00020
00022
00031 #ifndef BIFSTREAM_H_INCLUDED
00032 #define BIFSTREAM_H_INCLUDED
00033
00034 #include <fstream>
00035
00036 #include "binio.h"
00037
00038
00040
00044 class bifstream : public binistream, public ifstream
00045 {
00046 public:
00047 bifstream () : ifstream () { }
00048
00049 explicit
00050 bifstream (const char* name,
00051 ios::openmode mode = ios::in | ios::binary)
00052 : ifstream (name, mode)
00053 {
00054
00055 this->setFlag(binio::BigEndian, false);
00056 this->setFlag(binio::FloatIEEE);
00057 }
00058
00059
00060 virtual ~bifstream () {}
00061 void seek(long spos, Offset offs);
00062 long pos();
00063
00064 bifstream::Byte getByte();
00065 void getRaw (char *c, streamsize n) { this->read (c, n); }
00066
00067 };
00068
00069
00070
00071 bifstream& operator>> (bifstream& bif, double& n);
00072
00073 bifstream& operator>> (bifstream& bif, float& n);
00074
00075 bifstream& operator>> (bifstream& bif, long& n);
00076
00077 bifstream& operator>> (bifstream& bif, int& n);
00078
00079 #endif