KiCad PCB EDA Suite
Loading...
Searching...
No Matches
CLI::FP_EXPORT_SVG_COMMAND Class Reference

#include <command_fp_export_svg.h>

Inheritance diagram for CLI::FP_EXPORT_SVG_COMMAND:
CLI::PCB_EXPORT_BASE_COMMAND CLI::COMMAND

Public Member Functions

 FP_EXPORT_SVG_COMMAND ()
 
int Perform (KIWAY &aKiway)
 Entry point to processing commands from args and doing work. More...
 
argparse::ArgumentParser & GetArgParser ()
 
const std::string & GetName () const
 
void PrintHelp ()
 

Protected Member Functions

int doPerform (KIWAY &aKiway) override
 The internal handler that should be overloaded to implement command specific processing and work. More...
 
LSET convertLayerStringList (wxString &aLayerString, bool &aLayerArgSet) const
 
void addLayerArg (bool aRequire)
 
void addCommonArgs (bool aInput, bool aOutput, bool aInputIsDir, bool aOutputIsDir)
 Sets up the most common of args used across cli. More...
 
void addDrawingSheetArg ()
 Sets up the drawing sheet arg used by many of the export commands. More...
 
void addDefineArg ()
 Sets up the drawing sheet arg used by many of the export commands. More...
 

Protected Attributes

std::map< std::string, LSETm_layerMasks
 
std::map< std::string, LSETm_layerGuiMasks
 
LSET m_selectedLayers
 
bool m_selectedLayersSet
 
bool m_hasLayerArg
 
bool m_requireLayers
 
std::string m_name
 Name of this command that is exported and used in the cli. More...
 
argparse::ArgumentParser m_argParser
 
bool m_hasInputArg
 Whether or not the input arg was added for parsing. More...
 
bool m_hasOutputArg
 Whether or not the output arg was added for parsing. More...
 
bool m_hasDrawingSheetArg
 Whether or not the input arg was added for parsing. More...
 
bool m_hasDefineArg
 Whether or not the input arg was added for parsing. More...
 
bool m_outputArgExpectsDir
 Whether or not the output arg is expecting a directory. More...
 
wxString m_argInput
 Value of the common input arg if configured. More...
 
wxString m_argOutput
 Value of the output arg if configured. More...
 
wxString m_argDrawingSheet
 Value of the drawing sheet arg if configured. More...
 
std::map< wxString, wxString > m_argDefineVars
 Value of the drawing sheet arg if configured. More...
 

Detailed Description

Definition at line 28 of file command_fp_export_svg.h.

Constructor & Destructor Documentation

◆ FP_EXPORT_SVG_COMMAND()

Member Function Documentation

◆ addCommonArgs()

void CLI::COMMAND::addCommonArgs ( bool  aInput,
bool  aOutput,
bool  aInputIsDir,
bool  aOutputIsDir 
)
protectedinherited

Sets up the most common of args used across cli.

Parameters
aInputConfigures the input arg
aOutputConfigures the output arg
aInputIsDirConfigures whether the input arg description will be for a file or directory
aOutputIsDirConfigures whether the output arg description will be for a file or directory

Definition at line 115 of file command.cpp.

References _, ARG_INPUT, ARG_OUTPUT, and UTF8STDSTR.

Referenced by CLI::PCB_DRC_COMMAND::PCB_DRC_COMMAND(), CLI::PCB_EXPORT_3D_COMMAND::PCB_EXPORT_3D_COMMAND(), CLI::PCB_EXPORT_BASE_COMMAND::PCB_EXPORT_BASE_COMMAND(), CLI::SCH_ERC_COMMAND::SCH_ERC_COMMAND(), CLI::SCH_EXPORT_BOM_COMMAND::SCH_EXPORT_BOM_COMMAND(), CLI::SCH_EXPORT_NETLIST_COMMAND::SCH_EXPORT_NETLIST_COMMAND(), CLI::SCH_EXPORT_PLOT_COMMAND::SCH_EXPORT_PLOT_COMMAND(), CLI::SCH_EXPORT_PYTHONBOM_COMMAND::SCH_EXPORT_PYTHONBOM_COMMAND(), CLI::SYM_EXPORT_SVG_COMMAND::SYM_EXPORT_SVG_COMMAND(), and CLI::SYM_UPGRADE_COMMAND::SYM_UPGRADE_COMMAND().

◆ addDefineArg()

◆ addDrawingSheetArg()

◆ addLayerArg()

◆ convertLayerStringList()

LSET CLI::PCB_EXPORT_BASE_COMMAND::convertLayerStringList ( wxString &  aLayerString,
bool &  aLayerArgSet 
) const
protectedinherited

Definition at line 75 of file command_pcb_export_base.cpp.

References _, and TO_UTF8.

◆ doPerform()

int CLI::FP_EXPORT_SVG_COMMAND::doPerform ( KIWAY aKiway)
overrideprotectedvirtual

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 from CLI::COMMAND.

Definition at line 58 of file command_fp_export_svg.cpp.

References _, LSET::AllLayersMask(), ARG_BLACKANDWHITE, ARG_FOOTPRINT, ARG_THEME, CLI::PCB_EXPORT_BASE_COMMAND::doPerform(), CLI::EXIT_CODES::ERR_INVALID_INPUT_FILE, KIWAY::FACE_PCB, From_UTF8(), CLI::EXIT_CODES::OK, and KIWAY::ProcessJob().

◆ GetArgParser()

argparse::ArgumentParser & CLI::COMMAND::GetArgParser ( )
inlineinherited

Definition at line 59 of file command.h.

References CLI::COMMAND::m_argParser.

Referenced by recurseArgParserBuild(), and recurseArgParserSubCommandUsed().

◆ GetName()

const std::string & CLI::COMMAND::GetName ( ) const
inlineinherited

Definition at line 60 of file command.h.

References CLI::COMMAND::m_name.

Referenced by recurseArgParserSubCommandUsed().

◆ Perform()

int CLI::COMMAND::Perform ( KIWAY aKiway)
inherited

Entry point to processing commands from args and doing work.

Definition at line 56 of file command.cpp.

References ARG_DEFINE_VAR_LONG, ARG_DRAWING_SHEET, ARG_HELP, ARG_INPUT, ARG_OUTPUT, CLI::EXIT_CODES::ERR_ARGS, From_UTF8(), and wxStringSplit().

◆ PrintHelp()

void CLI::COMMAND::PrintHelp ( )
inherited

Definition at line 48 of file command.cpp.

References From_UTF8().

Member Data Documentation

◆ m_argDefineVars

std::map<wxString, wxString> CLI::COMMAND::m_argDefineVars
protectedinherited

Value of the drawing sheet arg if configured.

Definition at line 143 of file command.h.

◆ m_argDrawingSheet

wxString CLI::COMMAND::m_argDrawingSheet
protectedinherited

Value of the drawing sheet arg if configured.

Definition at line 138 of file command.h.

◆ m_argInput

wxString CLI::COMMAND::m_argInput
protectedinherited

Value of the common input arg if configured.

Definition at line 128 of file command.h.

◆ m_argOutput

wxString CLI::COMMAND::m_argOutput
protectedinherited

Value of the output arg if configured.

Definition at line 133 of file command.h.

◆ m_argParser

◆ m_hasDefineArg

bool CLI::COMMAND::m_hasDefineArg
protectedinherited

Whether or not the input arg was added for parsing.

Definition at line 118 of file command.h.

◆ m_hasDrawingSheetArg

bool CLI::COMMAND::m_hasDrawingSheetArg
protectedinherited

Whether or not the input arg was added for parsing.

Definition at line 113 of file command.h.

◆ m_hasInputArg

bool CLI::COMMAND::m_hasInputArg
protectedinherited

Whether or not the input arg was added for parsing.

Definition at line 103 of file command.h.

◆ m_hasLayerArg

bool CLI::PCB_EXPORT_BASE_COMMAND::m_hasLayerArg
protectedinherited

◆ m_hasOutputArg

bool CLI::COMMAND::m_hasOutputArg
protectedinherited

Whether or not the output arg was added for parsing.

Definition at line 108 of file command.h.

◆ m_layerGuiMasks

std::map<std::string, LSET> CLI::PCB_EXPORT_BASE_COMMAND::m_layerGuiMasks
protectedinherited

◆ m_layerMasks

std::map<std::string, LSET> CLI::PCB_EXPORT_BASE_COMMAND::m_layerMasks
protectedinherited

◆ m_name

std::string CLI::COMMAND::m_name
protectedinherited

Name of this command that is exported and used in the cli.

Definition at line 96 of file command.h.

Referenced by CLI::COMMAND::GetName().

◆ m_outputArgExpectsDir

bool CLI::COMMAND::m_outputArgExpectsDir
protectedinherited

Whether or not the output arg is expecting a directory.

Definition at line 123 of file command.h.

◆ m_requireLayers

bool CLI::PCB_EXPORT_BASE_COMMAND::m_requireLayers
protectedinherited

◆ m_selectedLayers

LSET CLI::PCB_EXPORT_BASE_COMMAND::m_selectedLayers
protectedinherited

Definition at line 58 of file command_pcb_export_base.h.

◆ m_selectedLayersSet

bool CLI::PCB_EXPORT_BASE_COMMAND::m_selectedLayersSet
protectedinherited

The documentation for this class was generated from the following files: