31 unsigned aNetlistOptions )
33 aFormatter.
Print( 0,
"*\n" );
34 aFormatter.
Print( 0,
"\n" );
37 for(
auto const& [key, port] :
m_ports )
43 case L_INPUT: portDir =
"input";
break;
44 case L_OUTPUT: portDir =
"output";
break;
45 case L_BIDI: portDir =
"inout";
break;
50 wxFAIL_MSG(
"Invalid port direction" );
54 aFormatter.
Print( 0,
"+ %s ; %s\n", port.name.c_str(), portDir.c_str() );
57 aFormatter.
Print( 0,
"\n\n" );
62 unsigned aNetlistOptions )
64 aFormatter.
Print( 0,
"\n.ends\n" );
78 int& aNcCounter )
const
80 std::string netName = aNetName;
83 netName =
m_ports.at( netName ).name;
99 m_ports.insert( { std::string( conn->Name().ToUTF8() ),
virtual const wxString & GetText() const
Return the string associated with the text object.
SCHEMATIC_IFACE * m_schematic
The schematic we're generating a netlist for.
void WriteTail(OUTPUTFORMATTER &aFormatter, unsigned aNetlistOptions) override
Write the tail (.end).
std::map< std::string, PORT_INFO > m_ports
std::string GenerateItemPinNetName(const std::string &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 GetSheets(unsigned aNetlistOptions=0) const
Return the paths of exported sheets (either all or the current one).
virtual std::string GenerateItemPinNetName(const std::string &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.
virtual const wxString GetProjectName() const
Return the short name of the project.
A pure virtual class used to derive REPORTER objects from.
virtual PROJECT & Prj() const =0
Each graphical item can have a SCH_CONNECTION describing its logical connection (to a bus or net).
Base class for any item which can be embedded within the SCHEMATIC container class,...
SCH_CONNECTION * Connection(const SCH_SHEET_PATH *aSheet=nullptr) const
Retrieve the connection associated with this object in the given sheet.
LABEL_FLAG_SHAPE GetShape() 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.