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

Method DoSelect

Core/CLI/src/cli_select.cpp:24–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22using namespace sml;
23
24bool CommandLineInterface::DoSelect(const std::string* pOp)
25{
26 agent* thisAgent = m_pAgentSML->GetSoarAgent();
27 if (!pOp)
28 {
29 const char* my_selection = select_get_operator(thisAgent);
30
31 if (my_selection != NULL)
32 {
33 if (m_RawOutput)
34 {
35 m_Result << my_selection;
36 }
37 else
38 {
39 AppendArgTagFast(sml_Names::kOperator_ID, sml_Names::kTypeID, my_selection);
40 }
41 }
42 else
43 {
44 if (m_RawOutput)
45 {
46 m_Result << "No operator selected.";
47 }
48 else
49 {
50 AppendArgTagFast(sml_Names::kParamMessage, sml_Names::kTypeString, "No operator selected.");
51 }
52 }
53 }
54 else
55 {
56 select_next_operator(thisAgent, pOp->c_str());
57 }
58
59 return true;
60}

Callers 1

ParseMethod · 0.45

Calls 2

select_get_operatorFunction · 0.85
select_next_operatorFunction · 0.85

Tested by

no test coverage detected