CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/MagneticField/Interpolation/src/binary_ifstream.h

Go to the documentation of this file.
00001 #ifndef binary_ifstream_H
00002 #define binary_ifstream_H
00003 
00004 #include <string>
00005 #include <cstdio>
00006 #include "FWCore/Utilities/interface/Visibility.h"
00007 
00008 class binary_ifstream {
00009 public:
00010 
00011     explicit binary_ifstream( const char* name);
00012     explicit binary_ifstream( const std::string& name);
00013 
00014     ~binary_ifstream();
00015 
00016     binary_ifstream& operator>>( char& n);
00017     binary_ifstream& operator>>( unsigned char& n);
00018 
00019     binary_ifstream& operator>>( short& n);
00020     binary_ifstream& operator>>( unsigned short& n);
00021 
00022     binary_ifstream& operator>>( int& n);
00023     binary_ifstream& operator>>( unsigned int& n);
00024 
00025     binary_ifstream& operator>>( long& n);
00026     binary_ifstream& operator>>( unsigned long& n);
00027 
00028     binary_ifstream& operator>>( float& n);
00029     binary_ifstream& operator>>( double& n);
00030 
00031     binary_ifstream& operator>>( bool& n);
00032     binary_ifstream& operator>>( std::string& n);
00033 
00034     void close();
00035 
00037     bool good() const;
00038     bool eof() const;
00039     bool fail() const;
00040     bool bad() const;
00041     bool operator!() const;
00042     operator bool() const;
00043 
00044 private:
00045 
00046     FILE* file_;
00047 
00048     void init( const char* name);
00049 
00050 };
00051 
00052 #endif