*** empty log message ***

svn path=/trunk/boinc/; revision=2650
This commit is contained in:
Karl Chen 2003-11-09 03:54:58 +00:00
parent 6cf83823ee
commit 95456f122c
1 changed files with 26 additions and 3 deletions

View File

@ -167,16 +167,16 @@ public:
ifstream f(cp_filename.c_str(), ios::binary); ifstream f(cp_filename.c_str(), ios::binary);
if (!f) { if (!f) {
cerr << "Error opening for input \"" << cp_filename << "\"\n"; cerr << "Error opening for input \"" << cp_filename << "\"\n";
return true; return false;
} }
i->file->input(f); i->file->input(f);
if (!f) { if (!f) {
cerr << "Error reading \"" << cp_filename << "\"\n"; cerr << "Error reading \"" << cp_filename << "\"\n";
return true; return false;
} }
} }
// success // success
return false; return true;
} }
void write() void write()
@ -232,3 +232,26 @@ public:
} }
} }
}; };
/* usage in astropulse:
AtomicFileSet files;
void init()
{
files.add("ap_state.dat",
new BoincRawDataCheckpointFile(client.state, sizeof(client.state)));
files.add("pulse.out", new BoincStreamCheckpointFile);
if (files.read()) {
// resuming
} else {
// new run
}
}
void checkpoint()
{
files.write();
}
*/