6 #include "configcache.h"
12 static void initO(const string& cacheid, const int& nequi, const int& nskip, const string& datadir,
13 char **configmem, const int& configMemSize, const int& cachemode=CACHE_MODE_FULL, writeout *out_a=NULL) {
14 initCache(O, cacheid, nequi, nskip, datadir+"/o", configmem, configMemSize, cachemode, out_a);
16 static void initC(const string& cacheid, const int& nequi, const int& nskip, const string& datadir,
17 char **configmem, const int& configMemSize, const int& cachemode=CACHE_MODE_FULL, writeout *out_a=NULL) {
18 initCache(C, cacheid, nequi, nskip, datadir+"/c", configmem, configMemSize, cachemode, out_a);
21 static void initO(const string& cacheid, char **configmem, const int& configMemSize, const int& cachemode=CACHE_MODE_FULL) {
22 initCache(O, "o", cacheid, configmem, configMemSize, cachemode);
24 static void initC(const string& cacheid, char **configmem, const int& configMemSize, const int& cachemode=CACHE_MODE_FULL) {
25 initCache(C, "c", cacheid, configmem, configMemSize, cachemode);
28 static void addPara(const string& parid, const double& val=0);
29 static void setPara(const string& parid, const double& value);
30 static bool readO() { return O->readConfig(); }
31 static bool readC() { return C->readConfig(); }
32 static void writeO() { O->writeConfig(); }
33 static void writeC() { C->writeConfig(); }
34 static void writeHeaderO(const string& headerid, char *header, long unsigned int size) { O->writeHeader(headerid, header, size); }
35 static void *getHeaderO(const string& headerid) { O->getHeader(headerid); }
36 static void writeHeaderC(const string& headerid, char *header, long unsigned int size) { C->writeHeader(headerid, header, size); }
37 static void *getHeaderC(const string& headerid) { C->getHeader(headerid); }
51 static void initCache(configcache *cache,
52 const string& cacheid, const int& nequi, const int& nskip, const string& datadir,
53 char **configmem, const int& configMemSize, const int& cachemode=CACHE_MODE_FULL, writeout *out_a=NULL);
55 static void initCache( configcache *cache, const string& subdir,
56 const string& cacheid, char **configmem, const int& configMemSize, const int& cachemode=CACHE_MODE_FULL);
58 static configcache *O;
59 static configcache *C;
60 static defaults *Defaults;
61 static vector<para> delayedParaAdd;
62 static vector<para> delayedParaSet;