| 22 | using namespace sml; |
| 23 | |
| 24 | bool 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 | } |
no test coverage detected