MCPcopy Create free account
hub / github.com/SoarGroup/Soar / StartCaptureInput

Method StartCaptureInput

Core/KernelSML/src/sml_AgentSML.cpp:1256–1280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1254}
1255
1256bool 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
1282bool AgentSML::StopCaptureInput()
1283{

Callers 1

DoCaptureInputMethod · 0.80

Calls 4

CaptureQueryFunction · 0.85
ReplayQueryFunction · 0.85
SoarSeedRNGFunction · 0.85
goodMethod · 0.45

Tested by

no test coverage detected