File indexing completed on 2023-03-17 11:14:32
0001 #ifndef binary_ofstream_H
0002 #define binary_ofstream_H
0003
0004 #include <string>
0005 #include <cstdio>
0006
0007 #include "FWCore/Utilities/interface/Visibility.h"
0008 class binary_ofstream {
0009 public:
0010 explicit binary_ofstream(const char* name);
0011 explicit binary_ofstream(const std::string& name);
0012
0013 ~binary_ofstream();
0014
0015 binary_ofstream& operator<<(char n);
0016 binary_ofstream& operator<<(unsigned char n);
0017
0018 binary_ofstream& operator<<(short n);
0019 binary_ofstream& operator<<(unsigned short n);
0020
0021 binary_ofstream& operator<<(int n);
0022 binary_ofstream& operator<<(unsigned int n);
0023
0024 binary_ofstream& operator<<(long n);
0025 binary_ofstream& operator<<(unsigned long n);
0026
0027 binary_ofstream& operator<<(float n);
0028 binary_ofstream& operator<<(double n);
0029
0030 binary_ofstream& operator<<(bool n);
0031 binary_ofstream& operator<<(const std::string& n);
0032
0033 void close();
0034
0035 private:
0036 FILE* file_;
0037
0038 void init(const char* name);
0039 };
0040
0041 #endif