| 771 | } |
| 772 | |
| 773 | void EmbeddedShell::setMode(const std::string& modeString) { |
| 774 | if (modeString.empty()) { |
| 775 | printModeInfo(); |
| 776 | return; |
| 777 | } |
| 778 | auto modePrinter = PrinterFactory::getPrinter(PrinterTypeUtils::fromString(modeString)); |
| 779 | if (modePrinter == nullptr) { |
| 780 | printf("Cannot parse '%s' as output mode.\n\n", modeString.c_str()); |
| 781 | printModeInfo(); |
| 782 | return; |
| 783 | } |
| 784 | stats = modePrinter->defaultPrintStats(); |
| 785 | printer = std::move(modePrinter); |
| 786 | printf("mode set as %s\n", modeString.c_str()); |
| 787 | } |
| 788 | |
| 789 | void EmbeddedShell::setStats(const std::string& statsString) { |
| 790 | std::string statsStringLower = statsString; |
nothing calls this directly
no test coverage detected