MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / parse_command_param

Method parse_command_param

source/MaaFramework/Resource/PipelineParser.cpp:1461–1479  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1459}
1460
1461bool PipelineParser::parse_command_param(const json::value& input, Action::CommandParam& output, const Action::CommandParam& default_value)
1462{
1463 if (!get_and_check_value(input, "exec", output.exec, default_value.exec)) {
1464 LogError << "failed to get_and_check_value exec" << VAR(input);
1465 return false;
1466 }
1467
1468 if (!get_and_check_value_or_array(input, "args", output.args, default_value.args)) {
1469 LogError << "failed to get_and_check_value args" << VAR(input);
1470 return false;
1471 }
1472
1473 if (!get_and_check_value(input, "detach", output.detach, default_value.detach)) {
1474 LogError << "failed to get_and_check_value detach" << VAR(input);
1475 return false;
1476 }
1477
1478 return true;
1479}
1480
1481bool PipelineParser::parse_screencap(const json::value& input, Action::ScreencapParam& output, const Action::ScreencapParam& default_value)
1482{

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected