X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/blobdiff_plain/5adde094541b74abf79a902dc4b63141d281b818..c5c2e25140c048de78316f9d8faf01dc58509401:/configcache.h?ds=sidebyside diff --git a/configcache.h b/configcache.h index 3227233..4372946 100644 --- a/configcache.h +++ b/configcache.h @@ -12,6 +12,10 @@ #include #include +#define CACHE_MODE_DISABLED 0 +#define CACHE_MODE_READ 1 +#define CACHE_MODE_FULL 2 + using namespace std; struct parameter{ @@ -22,7 +26,7 @@ struct parameter{ class configcache{ public: ~configcache(); - configcache(const string& cacheid, const int& nequi, const int& nskip, const string& datadir, char **configmem, const int& configMemSize); + configcache(const string& cacheid, const int& nequi, const int& nskip, const string& datadir, char **configmem, const int& configMemSize, const int& cachemode=CACHE_MODE_FULL); bool readConfig(); void writeConfig(); void addPara(const string& parid, const double& val=0); @@ -35,6 +39,7 @@ class configcache{ int NSKIP; string DATADIR; string CACHEID; + int MODE; string getFileId(const bool& shortid=false); ofstream outFile;