]> git.treefish.org Git - phys/latlib.git/blobdiff - datread.h
Added resetconfig routine.
[phys/latlib.git] / datread.h
index 8ef4b152a5e357e532ff1f5be888c2624de105ba..64fd850845675d4987dbce3a8c8a84eb4ef8340f 100644 (file)
--- a/datread.h
+++ b/datread.h
@@ -3,6 +3,7 @@
 
 #include <ostream>
 #include <fstream>
+#include <memory>
 
 #include <boost/iostreams/filtering_streambuf.hpp>
 #include <boost/iostreams/filter/bzip2.hpp>
@@ -12,7 +13,6 @@ using namespace std;
 class datread {
  public:
   datread (const unsigned int& _blocksize, ostream *_log=NULL);
-  ~datread ();
   int openFile (const string& filename);
   enum class Format {DAT, EDAT, SDAT};
   void * getHeader (const string& headerid);
@@ -25,7 +25,7 @@ class datread {
   ifstream infile;
   Format format;
   string parastring;
-  boost::iostreams::filtering_istreambuf *inbuffer;
+  unique_ptr<boost::iostreams::filtering_istreambuf> inbuffer;
   ostream * const log;
   int readDataToMem (char *tmpData, long unsigned int dataSize);
   string filename;