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

Method DoWMA

Core/CLI/src/cli_wma.cpp:27–448  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25using namespace sml;
26
27bool CommandLineInterface::DoWMA(const char pOp, const std::string* pAttr, const std::string* pVal)
28{
29 agent* thisAgent = m_pAgentSML->GetSoarAgent();
30 if (!pOp)
31 {
32 std::string temp;
33 char* temp2;
34
35 if (m_RawOutput)
36 {
37 m_Result << "\n";
38 }
39 else
40 {
41 AppendArgTagFast(sml_Names::kParamValue, sml_Names::kTypeString, "");
42 }
43
44 temp = "WMA activation: ";
45 temp2 = thisAgent->wma_params->activation->get_string();
46 temp += temp2;
47 delete temp2;
48 if (m_RawOutput)
49 {
50 m_Result << temp << "\n\n";
51 }
52 else
53 {
54 AppendArgTagFast(sml_Names::kParamValue, sml_Names::kTypeString, temp.c_str());
55 AppendArgTagFast(sml_Names::kParamValue, sml_Names::kTypeString, "");
56 }
57
58 temp = "Activation";
59 if (m_RawOutput)
60 {
61 m_Result << temp << "\n";
62 }
63 else
64 {
65 AppendArgTagFast(sml_Names::kParamValue, sml_Names::kTypeString, temp.c_str());
66 }
67 temp = "----------";
68 if (m_RawOutput)
69 {
70 m_Result << temp << "\n";
71 }
72 else
73 {
74 AppendArgTagFast(sml_Names::kParamValue, sml_Names::kTypeString, temp.c_str());
75 }
76
77 temp = "decay-rate: ";
78 temp2 = thisAgent->wma_params->decay_rate->get_string();
79 temp += temp2;
80 delete temp2;
81 if (m_RawOutput)
82 {
83 m_Result << temp << "\n";
84 }

Callers 1

ParseMethod · 0.45

Calls 8

SetErrorFunction · 0.85
wma_get_wme_historyFunction · 0.85
for_eachMethod · 0.80
from_stringFunction · 0.50
get_stringMethod · 0.45
getMethod · 0.45
validate_stringMethod · 0.45
set_stringMethod · 0.45

Tested by

no test coverage detected