X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/blobdiff_plain/e34773ccb43eefc86dc814b768af85da2873e5ef..061e6469f58f3e3e892f1cd1f6fdd2aad9c644e8:/configcache.h?ds=sidebyside diff --git a/configcache.h b/configcache.h index d07aea4..74998c7 100644 --- a/configcache.h +++ b/configcache.h @@ -7,6 +7,8 @@ #include #include +#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 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 > headerStore; - - void deleteHeaderStore(); - bool readAllHeaders(); vector::iterator getNextInfile(vector *excludeFileHashes); @@ -108,6 +101,8 @@ class configcache{ bool doVirtualEquilibration, firstUsedConfig; string paraString(); + + datread *dataReader; }; #endif