X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/blobdiff_plain/3a8bc55b2fdece524393351af7996d743931c5b3..b3e5f37ca561e20879f984d53db68adae89ef413:/configcache.h diff --git a/configcache.h b/configcache.h index 3dda989..f07ccf5 100644 --- a/configcache.h +++ b/configcache.h @@ -30,6 +30,7 @@ struct infiledesc { int nequi; int nskip; bool doVirtualEquilibration; + bool extended; }; class configcache{ @@ -37,11 +38,16 @@ class configcache{ ~configcache(); configcache(const string& cacheid, const int& nequi, const int& nskip, const string& datadir, char **configmem, const int& configMemSize, const int& cachemode=CACHE_MODE_FULL, writeout *out_a=NULL); - bool readConfig(); + int readConfig(vector *excludeFileHashes=NULL); void writeConfig(); void addPara(const string& parid, const double& val=0); void setPara(const string& parid, const double& value); - + void writeHeader(const string& headerid, const char *header, long unsigned int size); + void * getHeader(const string& headerid); + string getOutFileName() { return outFileName.str(); } + string getInFileName() { return DATADIR + "/" + openFileDesc.filename; } + static unsigned long hash(const string& str); + private: infiledesc openFileDesc; void finishOutFile(); @@ -81,7 +87,21 @@ class configcache{ vector Paras; - int readConfigToMem(char *tmpConfig); + int readDataToMem(char *tmpData, long unsigned int dataSize); + + void openOutFile(); + + int readHeader(); + + bool headerWritten; + + int readFullBlock(char *tmpData, long unsigned int dataSize); + + vector< pair > headerStore; + + void deleteHeaderStore(); + + bool readAllHeaders(); }; #endif