X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/blobdiff_plain/22d4f36d4bbd95447a454cceb9084af46927e023..ad54f29de351976a096b4991fe426ffc30332df2:/hypercache.cpp diff --git a/hypercache.cpp b/hypercache.cpp index 6c8e190..03a20f8 100644 --- a/hypercache.cpp +++ b/hypercache.cpp @@ -5,16 +5,16 @@ vector hypercache::delayedParaAdd; vector hypercache::delayedParaSet; string hypercache::activeCFile = ""; vector hypercache::parentConfigs; -writeout *hypercache::out = NULL; +ostream* hypercache::log; vector hypercache::Os; void hypercache::initCache(configcache **cache, const string& cacheid, const int& nequi, const int& nskip, const string& datadir, - char **configmem, const int& configMemSize, const int& cachemode, writeout *out_a) { - if ( out_a != NULL ) - out = out_a; + char **configmem, const int& configMemSize, const int& cachemode, ostream* _log) { + if ( _log != NULL ) + log = _log; - *cache = new configcache(cacheid, nequi, nskip, datadir, configmem, configMemSize, cachemode, out_a); + *cache = new configcache(cacheid, nequi, nskip, datadir, configmem, configMemSize, cachemode, log); for (vector::iterator parit=delayedParaAdd.begin(); parit != delayedParaAdd.end(); ++parit) (*cache)->addPara(parit->parid, parit->val); @@ -73,6 +73,12 @@ int hypercache::readC() { return readret; } +int hypercache::read1CForEqui() { + int readret = C->readConfig(NULL); + C->closeInFile(); + return readret; +} + void hypercache::writeC() { C->writeConfig(); activeCFile = fileOfPath( C->getOutFileName().substr( 0, C->getOutFileName().length()-4 ) );