CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
binary_ifstream.h
Go to the documentation of this file.
1 #ifndef binary_ifstream_H
2 #define binary_ifstream_H
3 
4 #include <string>
5 #include <cstdio>
7 
9 public:
10 
11  explicit binary_ifstream( const char* name);
12  explicit binary_ifstream( const std::string& name);
13 
15 
16  binary_ifstream& operator>>( char& n);
17  binary_ifstream& operator>>( unsigned char& n);
18 
19  binary_ifstream& operator>>( short& n);
20  binary_ifstream& operator>>( unsigned short& n);
21 
22  binary_ifstream& operator>>( int& n);
23  binary_ifstream& operator>>( unsigned int& n);
24 
25  binary_ifstream& operator>>( long& n);
26  binary_ifstream& operator>>( unsigned long& n);
27 
28  binary_ifstream& operator>>( float& n);
29  binary_ifstream& operator>>( double& n);
30 
31  binary_ifstream& operator>>( bool& n);
33 
34  void close();
35 
37  bool good() const;
38  bool eof() const;
39  bool fail() const;
40  bool bad() const;
41  bool operator!() const;
42  operator bool() const;
43 
44 private:
45 
46  FILE* file_;
47 
48  void init( const char* name);
49 
50 };
51 
52 #endif
bool bad() const
bool good() const
stream state checking
bool eof() const
bool operator!() const
binary_ifstream(const char *name)
binary_ifstream & operator>>(char &n)
void init(const char *name)
bool fail() const