KiCad PCB EDA Suite
|
#include <command.h>
Public Member Functions | |
COMMAND (const std::string &aName) | |
Define a new COMMAND instance. More... | |
int | Perform (KIWAY &aKiway) |
Entry point to processing commands from args and doing work. More... | |
virtual | ~COMMAND ()=default |
argparse::ArgumentParser & | GetArgParser () |
const std::string & | GetName () const |
void | PrintHelp () |
Protected Member Functions | |
virtual int | doPerform (KIWAY &aKiway) |
The internal handler that should be overloaded to implement command specific processing and work. More... | |
Protected Attributes | |
std::string | m_name |
argparse::ArgumentParser | m_argParser |
CLI::COMMAND::COMMAND | ( | const std::string & | aName | ) |
Define a new COMMAND instance.
aName | The name of the command that is to be used in the cli interface |
Definition at line 29 of file command.cpp.
References ARG_HELP, ARG_HELP_DESC, ARG_HELP_SHORT, m_argParser, and UTF8STDSTR.
|
virtualdefault |
|
protectedvirtual |
The internal handler that should be overloaded to implement command specific processing and work.
If not overloaded, the command will simply emit the help options by default
Reimplemented in CLI::EXPORT_PCB_BASE_COMMAND, CLI::EXPORT_PCB_DRILL_COMMAND, CLI::EXPORT_PCB_DXF_COMMAND, CLI::EXPORT_PCB_GERBER_COMMAND, CLI::EXPORT_PCB_GERBERS_COMMAND, CLI::EXPORT_PCB_PDF_COMMAND, CLI::EXPORT_PCB_POS_COMMAND, CLI::EXPORT_PCB_STEP_COMMAND, CLI::EXPORT_PCB_SVG_COMMAND, CLI::EXPORT_SCH_NETLIST_COMMAND, CLI::EXPORT_SCH_PDF_COMMAND, CLI::EXPORT_SCH_PYTHONBOM_COMMAND, CLI::EXPORT_SCH_SVG_COMMAND, CLI::FP_EXPORT_SVG_COMMAND, CLI::FP_UPGRADE_COMMAND, CLI::SYM_EXPORT_SVG_COMMAND, CLI::SYM_UPGRADE_COMMAND, and CLI::VERSION_COMMAND.
Definition at line 62 of file command.cpp.
References CLI::EXIT_CODES::OK.
|
inline |
Definition at line 54 of file command.h.
References m_argParser.
Referenced by recurseArgParserBuild(), and recurseArgParserSubCommandUsed().
|
inline |
Definition at line 55 of file command.h.
References m_name.
Referenced by recurseArgParserSubCommandUsed().
int CLI::COMMAND::Perform | ( | KIWAY & | aKiway | ) |
Entry point to processing commands from args and doing work.
Definition at line 49 of file command.cpp.
References ARG_HELP.
void CLI::COMMAND::PrintHelp | ( | ) |
Definition at line 41 of file command.cpp.
References FROM_UTF8().
|
protected |
Definition at line 68 of file command.h.
Referenced by COMMAND(), CLI::EXPORT_PCB_BASE_COMMAND::EXPORT_PCB_BASE_COMMAND(), CLI::EXPORT_PCB_DRILL_COMMAND::EXPORT_PCB_DRILL_COMMAND(), CLI::EXPORT_PCB_DXF_COMMAND::EXPORT_PCB_DXF_COMMAND(), CLI::EXPORT_PCB_GERBER_COMMAND::EXPORT_PCB_GERBER_COMMAND(), CLI::EXPORT_PCB_GERBERS_COMMAND::EXPORT_PCB_GERBERS_COMMAND(), CLI::EXPORT_PCB_PDF_COMMAND::EXPORT_PCB_PDF_COMMAND(), CLI::EXPORT_PCB_POS_COMMAND::EXPORT_PCB_POS_COMMAND(), CLI::EXPORT_PCB_STEP_COMMAND::EXPORT_PCB_STEP_COMMAND(), CLI::EXPORT_PCB_SVG_COMMAND::EXPORT_PCB_SVG_COMMAND(), CLI::EXPORT_SCH_NETLIST_COMMAND::EXPORT_SCH_NETLIST_COMMAND(), CLI::EXPORT_SCH_PDF_COMMAND::EXPORT_SCH_PDF_COMMAND(), CLI::EXPORT_SCH_SVG_COMMAND::EXPORT_SCH_SVG_COMMAND(), CLI::FP_EXPORT_SVG_COMMAND::FP_EXPORT_SVG_COMMAND(), CLI::FP_UPGRADE_COMMAND::FP_UPGRADE_COMMAND(), GetArgParser(), CLI::SYM_EXPORT_SVG_COMMAND::SYM_EXPORT_SVG_COMMAND(), CLI::SYM_UPGRADE_COMMAND::SYM_UPGRADE_COMMAND(), and CLI::VERSION_COMMAND::VERSION_COMMAND().
|
protected |