51    if( ( f = wxFopen( aOutFileName, wxT( 
"wt" ) ) ) == 
nullptr )
 
   53        wxString msg = wxString::Format( 
_( 
"Failed to create file '%s'." ), aOutFileName );
 
   58    std::vector< SCH_REFERENCE > cmpList;
 
   60    ret |= fprintf( f, 
"( { %s created  %s }\n",
 
   71        std::vector<EDA_ITEM*> sheetItems;
 
   74            sheetItems.push_back( item );
 
   78            return item1->
m_Uuid < item2->m_Uuid;
 
   81        std::sort( sheetItems.begin(), sheetItems.end(), pred );
 
   94            std::vector<PIN_INFO> pins = 
CreatePinList( symbol, sheet, 
true );
 
  103            footprint.Replace( wxT( 
" " ), wxT( 
"_" ) );
 
  105            if( footprint.IsEmpty() )
 
  106                footprint = wxT( 
"$noname" );
 
  108            ret |= fprintf( f, 
" ( %s %s",
 
  112            field = symbol->
GetRef( &sheet );
 
  114            ret |= fprintf( f, 
"  %s", 
TO_UTF8( field ) );
 
  116            field = symbol->
GetValue( 
true, &sheet, 
false );
 
  117            field.Replace( wxT( 
" " ), wxT( 
"_" ) );
 
  119            ret |= fprintf( f, 
" %s", 
TO_UTF8( field ) );
 
  121            ret |= fprintf( f, 
"\n" );
 
  126                if( 
pin.num.IsEmpty() )     
 
  129                netName = 
pin.netName;
 
  130                netName.Replace( wxT( 
" " ), wxT( 
"_" ) );
 
  135            ret |= fprintf( f, 
" )\n" );
 
  139    ret |= fprintf( f, 
")\n*\n" );
 
 
A base class for most all the KiCad significant classes used in schematics and boards.
 
wxString AsString() const
 
wxArrayString GetFPFilters() const
 
SCHEMATIC * m_schematic
The schematic we're generating a netlist for.
 
std::vector< PIN_INFO > CreatePinList(SCH_SYMBOL *aSymbol, const SCH_SHEET_PATH &aSheetPath, bool aKeepUnconnectedPins)
Find a symbol from the DrawList and builds its pin list.
 
SCH_SYMBOL * findNextSymbol(EDA_ITEM *aItem, const SCH_SHEET_PATH &aSheetPath)
Check if the given symbol should be processed for netlisting.
 
UNIQUE_STRINGS m_referencesAlreadyFound
Used for "multiple symbols per package" symbols to avoid processing a lib symbol more than once.
 
bool WriteNetlist(const wxString &aOutFileName, unsigned aNetlistOptions, REPORTER &aReporter) override
Write to specified output file.
 
A pure virtual class used to derive REPORTER objects from.
 
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
Report a string with a given severity.
 
A helper to define a symbol's reference designator in a schematic.
 
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
 
const wxString GetValue(bool aResolve, const SCH_SHEET_PATH *aPath, bool aAllowExtraText) const override
 
const wxString GetFootprintFieldText(bool aResolve, const SCH_SHEET_PATH *aPath, bool aAllowExtraText) const
 
std::unique_ptr< LIB_SYMBOL > & GetLibSymbolRef()
 
const wxString GetRef(const SCH_SHEET_PATH *aSheet, bool aIncludeUnit=false) const override
 
bool GetExcludedFromBoard() const override
 
This file is part of the common library.
 
#define NETLIST_HEAD_STRING
 
Collection of utility functions for component reference designators (refdes)
 
wxString GetISO8601CurrentDateTime()
 
#define TO_UTF8(wxstring)
Convert a wxString to a UTF8 encoded C string for all wxWidgets build modes.