MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / setMode

Method setMode

tools/shell/embedded_shell.cpp:773–787  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

771}
772
773void 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
789void EmbeddedShell::setStats(const std::string& statsString) {
790 std::string statsStringLower = statsString;

Callers

nothing calls this directly

Calls 3

printModeInfoFunction · 0.85
emptyMethod · 0.45
defaultPrintStatsMethod · 0.45

Tested by

no test coverage detected