CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/MagneticField/Interpolation/src/binary_ofstream.h

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