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

Method Reinitialize

Core/KernelSML/src/sml_AgentSML.cpp:249–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249bool AgentSML::Reinitialize()
250{
251 m_pKernelSML->FireAgentEvent(this, smlEVENT_BEFORE_AGENT_REINITIALIZED) ;
252
253 bool ok = reinitialize_soar(m_agent);
254
255 // This must happen now because old output link identifiers get shipped over during do_output_phase above
256 // and then the new identifiers get shipped out during do_output_phase inside init_agent_memory below.
257 // With smem, those identifier details can change (output-link not being I3) and this causes problems.
258 // Can't use smlEVENT_AFTER_AGENT_REINITIALIZED because that happens too late.
259 this->m_OutputListener.SendOutputInitEvent();
260
261 init_agent_memory(m_agent);
262
263 InitializeRuntimeState() ;
264
265 ResetCaptureReplay();
266 m_pKernelSML->FireAgentEvent(this, smlEVENT_AFTER_AGENT_REINITIALIZED) ;
267 return ok ;
268}
269
270void AgentSML::RemoveAllListeners(Connection* pConnection)
271{

Callers 1

DoInitSoarMethod · 0.80

Calls 3

reinitialize_soarFunction · 0.85
init_agent_memoryFunction · 0.85
SendOutputInitEventMethod · 0.80

Tested by

no test coverage detected