30 unsigned aNetlistOptions )
32 aFormatter.
Print( 0,
"*\n" );
33 aFormatter.
Print( 0,
"\n" );
36 for(
auto const& [key, port] :
m_ports )
42 case L_INPUT: portDir =
"input";
break;
43 case L_OUTPUT: portDir =
"output";
break;
44 case L_BIDI: portDir =
"inout";
break;
47 default: wxFAIL_MSG(
"Invalid port direction" );
break;
53 aFormatter.
Print( 0,
"\n\n" );
58 unsigned aNetlistOptions )
60 aFormatter.
Print( 0,
"\n.ends\n" );
76 int& aNcCounter )
const
78 wxString netName = aNetName;
81 netName =
m_ports.at( netName).m_name;
95 if(
const auto netName =
itemNetName( *label, sheet ) )
SCHEMATIC * m_schematic
The schematic we're generating a netlist for.
std::optional< wxString > itemNetName(const SCH_ITEM &aItem, const SCH_SHEET_PATH &aPath) const
void WriteTail(OUTPUTFORMATTER &aFormatter, unsigned aNetlistOptions) override
Write the tail (.end).
std::map< wxString, PORT_INFO > m_ports
wxString GenerateItemPinNetName(const wxString &aNetName, int &aNcCounter) const override
bool ReadSchematicAndLibraries(unsigned aNetlistOptions, REPORTER &aReporter) override
Process the schematic and Spice libraries to create net mapping and a list of SPICE_ITEMs.
void readPorts(unsigned aNetlistOptions)
void WriteHead(OUTPUTFORMATTER &aFormatter, unsigned aNetlistOptions) override
Write the netlist head (title and so on).
SCH_SHEET_LIST BuildSheetList(unsigned aNetlistOptions=0) const
Return the paths of exported sheets (either all or the current one).
virtual wxString GenerateItemPinNetName(const wxString &aNetName, int &aNcCounter) const
virtual bool ReadSchematicAndLibraries(unsigned aNetlistOptions, REPORTER &aReporter)
Process the schematic and Spice libraries to create net mapping and a list of SPICE_ITEMs.
A pure virtual class used to derive REPORTER objects from.
Base class for any item which can be embedded within the SCHEMATIC container class,...
LABEL_FLAG_SHAPE GetShape() const
wxString GetShownText(const SCH_SHEET_PATH *aPath, RESOLUTION_CONTEXT aContext, int aDepth=0) const override
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
#define TO_UTF8(wxstring)
Convert a wxString to a UTF8 encoded C string for all wxWidgets build modes.