| 1254 | } |
| 1255 | |
| 1256 | bool AgentSML::StartCaptureInput(const std::string& pathname, bool autoflush, uint32_t seed) |
| 1257 | { |
| 1258 | if (CaptureQuery()) |
| 1259 | { |
| 1260 | return false; |
| 1261 | } |
| 1262 | if (ReplayQuery()) |
| 1263 | { |
| 1264 | return false; |
| 1265 | } |
| 1266 | |
| 1267 | m_CaptureAutoflush = autoflush; |
| 1268 | |
| 1269 | m_pCaptureFile = new std::fstream(pathname.c_str(), std::fstream::out | std::fstream::trunc); |
| 1270 | if (m_pCaptureFile && m_pCaptureFile->good()) |
| 1271 | { |
| 1272 | SoarSeedRNG(seed); |
| 1273 | *m_pCaptureFile << seed << std::endl; |
| 1274 | return true; |
| 1275 | } |
| 1276 | |
| 1277 | delete m_pCaptureFile; |
| 1278 | m_pCaptureFile = 0; |
| 1279 | return false; |
| 1280 | } |
| 1281 | |
| 1282 | bool AgentSML::StopCaptureInput() |
| 1283 | { |
no test coverage detected