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

Method HandleIsProductionLoaded

Core/KernelSML/src/sml_KernelSMLHandlers.cpp:568–587  ·  view source on GitHub ↗

Returns true if the production name is currently loaded

Source from the content-addressed store, hash-verified

566
567// Returns true if the production name is currently loaded
568bool KernelSML::HandleIsProductionLoaded(AgentSML* pAgentSML, char const* pCommandName, Connection* pConnection, AnalyzeXML* pIncoming, soarxml::ElementXML* pResponse)
569{
570 // Look up the name of the production
571 char const* pName = pIncoming->GetArgString(sml_Names::kParamName) ;
572
573 if (!pName)
574 {
575 return InvalidArg(pConnection, pResponse, pCommandName, "Need to specify the production name to check.") ;
576 }
577
578 Symbol* sym = find_str_constant(pAgentSML->GetSoarAgent(), pName);
579
580 bool found = true;
581 if (!sym || !(sym->sc->production))
582 {
583 found = false;
584 }
585
586 return ReturnBoolResult(pConnection, pResponse, found) ;
587}
588
589bool KernelSML::HandleGetVersion(AgentSML* /*pAgentSML*/, char const* /*pCommandName*/, Connection* pConnection, AnalyzeXML* /*pIncoming*/, soarxml::ElementXML* pResponse)
590{

Callers

nothing calls this directly

Calls 2

find_str_constantFunction · 0.85
GetArgStringMethod · 0.80

Tested by

no test coverage detected