CMS 3D CMS Logo

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 
10  public:
11  explicit binary_ifstream(const char* name);
12  explicit binary_ifstream(const std::string& name);
13 
14  binary_ifstream(const binary_ifstream&) = delete;
16  binary_ifstream& operator=(const binary_ifstream&) = delete;
18 
20 
22  binary_ifstream& operator>>(unsigned char& n);
23 
24  binary_ifstream& operator>>(short& n);
25  binary_ifstream& operator>>(unsigned short& n);
26 
28  binary_ifstream& operator>>(unsigned int& n);
29 
31  binary_ifstream& operator>>(unsigned long& n);
32 
33  binary_ifstream& operator>>(float& n);
34  binary_ifstream& operator>>(double& n);
35 
38 
39  void close();
40 
42  bool good() const;
43  bool eof() const;
44  bool fail() const;
45  bool bad() const;
46  bool operator!() const;
47  operator bool() const;
48 
49  long tellg();
50  binary_ifstream& seekg(long);
51 
52  private:
53  FILE* file_;
54 
55  void init(const char* name);
56  };
57 } // namespace magneticfield::interpolation
58 #endif
bool good() const
stream state checking
binary_ifstream & operator=(const binary_ifstream &)=delete