24#include <argparse/argparse.hpp>
27#define UTF8STDSTR( s ) ( std::string( s.utf8_str() ) )
29#define ARG_VERSION "--version"
30#define ARG_HELP "--help"
31#define ARG_HELP_SHORT "-h"
32#define ARG_HELP_DESC _( "Shows help message and exits" )
33#define ARG_OUTPUT "--output"
34#define ARG_INPUT "input"
35#define ARG_DRAWING_SHEET "--drawing-sheet"
36#define ARG_DEFINE_VAR_SHORT "-D"
37#define ARG_DEFINE_VAR_LONG "--define-var"
50 COMMAND(
const std::string& aName );
75 void addCommonArgs(
bool aInput,
bool aOutput,
bool aInputIsDir,
bool aOutputIsDir );
virtual ~COMMAND()=default
std::string m_name
Name of this command that is exported and used in the cli.
std::map< wxString, wxString > m_argDefineVars
Value of the drawing sheet arg if configured.
virtual int doPerform(KIWAY &aKiway)
The internal handler that should be overloaded to implement command specific processing and work.
argparse::ArgumentParser & GetArgParser()
bool m_hasDefineArg
Whether or not the input arg was added for parsing.
argparse::ArgumentParser m_argParser
bool m_hasOutputArg
Whether or not the output arg was added for parsing.
void addDefineArg()
Set up the drawing sheet arg used by many of the export commands.
bool m_outputArgExpectsDir
Whether or not the output arg is expecting a directory.
const std::string & GetName() const
int Perform(KIWAY &aKiway)
Entry point to processing commands from args and doing work.
wxString m_argDrawingSheet
Value of the drawing sheet arg if configured.
void addCommonArgs(bool aInput, bool aOutput, bool aInputIsDir, bool aOutputIsDir)
Set up the most common of args used across cli.
wxString m_argOutput
Value of the output arg if configured.
wxString m_argInput
Value of the common input arg if configured.
bool m_hasInputArg
Whether or not the input arg was added for parsing.
void addDrawingSheetArg()
Set up the drawing sheet arg used by many of the export commands.
bool m_hasDrawingSheetArg
Whether or not the input arg was added for parsing.
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...