]> git.treefish.org Git - phys/latlib.git/blobdiff - configcache.h
...
[phys/latlib.git] / configcache.h
index d07aea429252087e1f98d1d44b57d408fdb5c43a..74998c7bf77230f31bec7d4b39fb869407e13293 100644 (file)
@@ -7,6 +7,8 @@
 #include <sstream>
 #include <ostream>
 
+#include "datread.h"
+
 #define CACHE_MODE_OO 0
 #define CACHE_MODE_RO 1
 #define CACHE_MODE_WO 2
@@ -41,7 +43,7 @@ class configcache{
   string getOutFileName() { return outFileName.str(); }
   string getInFileName() { return DATADIR + "/" + openFileDesc.filename; }
   static unsigned long hash(const string& str);
-  void closeInFile() { inFile.close(); }
+  void closeInFile() { dataReader->closeFile(); }
   int inFilesLeft() { return inFiles.size(); }
   char* getConfigMem() { return configMem; }
   int getConfigSize() { return configSize; }
@@ -63,7 +65,6 @@ class configcache{
   string getFileId(int actnequi, const bool& superextended=true, const bool& shortid=false);
 
   ofstream outFile;
-  ifstream inFile;
 
   stringstream outFileName;
 
@@ -85,20 +86,12 @@ class configcache{
 
   vector<parameter> Paras;
 
-  int readDataToMem(char *tmpData, long unsigned int dataSize);
-
   void openOutFile(int actnequi);
 
   int readHeader();
 
   bool headerWritten;
 
-  int readFullBlock(char *tmpData, long unsigned int dataSize);
-
-  vector< pair<unsigned long, void *> > headerStore;
-
-  void deleteHeaderStore();
-
   bool readAllHeaders();
 
   vector<infiledesc>::iterator getNextInfile(vector<unsigned long> *excludeFileHashes);
@@ -108,6 +101,8 @@ class configcache{
   bool doVirtualEquilibration, firstUsedConfig;
 
   string paraString();
+
+  datread *dataReader;
 };
 
 #endif