36#include <wx/wfstream.h> 
   54    wxFFileOutputStream stream( aOutFileName );
 
   62    return xdoc.Save( stream, 2  );
 
 
  108    wxString                     description;
 
  110    nlohmann::ordered_map<wxString, wxString> fields;
 
  121        wxString ref = aSymbol->
GetRef( &aSheet );
 
  131                wxString ref2 = symbol2->
GetRef( &sheet );
 
  133                if( ref2.CmpNoCase( ref ) != 0 )
 
  143                if( !candidate.IsEmpty() && ( unit < minUnit || value.IsEmpty() ) )
 
  149                if( !candidate.IsEmpty() && ( unit < minUnit || footprint.IsEmpty() ) )
 
  150                    footprint = candidate;
 
  157                if( !candidate.IsEmpty() && ( unit < minUnit || 
datasheet.IsEmpty() ) )
 
  165                if( !candidate.IsEmpty() && ( unit < minUnit || description.IsEmpty() ) )
 
  166                    description = candidate;
 
  171                    if( field.IsMandatory() || field.IsPrivate() )
 
  174                    if( unit < minUnit || fields.count( field.GetName() ) == 0 )
 
  177                            fields[field.GetName()] = field.GetShownText( &aSheet, 
false );
 
  179                            fields[field.GetName()] = field.GetText();
 
  183                minUnit = std::min( unit, minUnit );
 
  203            description = descriptionField->
GetShownText( &aSheet, 
false );
 
  205            description = descriptionField->
GetText();
 
  209            if( field.IsMandatory() || field.IsPrivate() )
 
  213                fields[field.GetName()] = field.GetShownText( &aSheet, 
false );
 
  215                fields[field.GetName()] = field.GetText();
 
  227        aNode->AddChild( 
node( wxT( 
"value" ), wxT( 
"~" ) ) );
 
  229    if( footprint.size() )
 
  235    if( description.size() )
 
  239    aNode->AddChild( xfields = 
node( wxT( 
"fields" ) ) );
 
  241    for( 
const auto& [ fieldName, fieldValue ] : fields )
 
  245        xfields->AddChild( xfield );
 
 
  252    XNODE* xcomps = 
node( wxT( 
"components" ) );
 
  273                                        b->GetRef( &sheet, 
false ), 
true ) < 0 );
 
  276        std::set<
SCH_SYMBOL*, 
decltype( cmp )> ordered_symbols( cmp );
 
  277        std::multiset<
SCH_SYMBOL*, 
decltype( cmp )> extra_units( cmp );
 
  282            auto        test = ordered_symbols.insert( symbol );
 
  286                if( ( *( 
test.first ) )->m_Uuid > symbol->
m_Uuid )
 
  288                    extra_units.insert( *( 
test.first ) );
 
  289                    ordered_symbols.erase( 
test.first );
 
  290                    ordered_symbols.insert( symbol );
 
  294                    extra_units.insert( symbol );
 
  299        for( 
EDA_ITEM* item : ordered_symbols )
 
  319            xcomps->AddChild( xcomp = 
node( wxT( 
"comp" ) ) );
 
  325            xcomp->AddChild( xlibsource = 
node( wxT( 
"libsource" ) ) );
 
  356            std::vector<SCH_FIELD>& fields = symbol->
GetFields();
 
  360                if( field.IsMandatory() || field.IsPrivate() )
 
  363                xcomp->AddChild( xproperty = 
node( wxT( 
"property" ) ) );
 
  364                xproperty->
AddAttribute( wxT( 
"name" ), field.GetCanonicalName() );
 
  367                    xproperty->
AddAttribute( wxT( 
"value" ), field.GetShownText( &sheet, 
false ) );
 
  369                    xproperty->
AddAttribute( wxT( 
"value" ), field.GetText() );
 
  372            for( 
const SCH_FIELD& sheetField : sheet.Last()->GetFields() )
 
  374                xcomp->AddChild( xproperty = 
node( wxT( 
"property" ) ) );
 
  375                xproperty->
AddAttribute( wxT( 
"name" ), sheetField.GetCanonicalName() );
 
  380                    xproperty->
AddAttribute( wxT( 
"value" ), sheetField.GetShownText( &sheet, 
false ) );
 
  382                    xproperty->
AddAttribute( wxT( 
"value" ), sheetField.GetText() );
 
  387                xcomp->AddChild( xproperty = 
node( wxT( 
"property" ) ) );
 
  388                xproperty->
AddAttribute( wxT( 
"name" ), wxT( 
"exclude_from_bom" ) );
 
  393                xcomp->AddChild( xproperty = 
node( wxT( 
"property" ) ) );
 
  394                xproperty->
AddAttribute( wxT( 
"name" ), wxT( 
"exclude_from_board" ) );
 
  399                xcomp->AddChild( xproperty = 
node( wxT( 
"property" ) ) );
 
  403            if( 
const std::unique_ptr<LIB_SYMBOL>& part = symbol->
GetLibSymbolRef() )
 
  405                if( part->GetKeyWords().size() )
 
  407                    xcomp->AddChild( xproperty = 
node( wxT( 
"property" ) ) );
 
  408                    xproperty->
AddAttribute( wxT( 
"name" ), wxT( 
"ki_keywords" ) );
 
  409                    xproperty->
AddAttribute( wxT( 
"value" ), part->GetKeyWords() );
 
  412                if( !part->GetFPFilters().IsEmpty() )
 
  416                    for( 
const wxString& 
filter : part->GetFPFilters() )
 
  419                    xcomp->AddChild( xproperty = 
node( wxT( 
"property" ) ) );
 
  420                    xproperty->
AddAttribute( wxT( 
"name" ), wxT( 
"ki_fp_filters" ) );
 
  421                    xproperty->
AddAttribute( wxT( 
"value" ), filters.Trim( 
false ) );
 
  424                if( part->GetDuplicatePinNumbersAreJumpers() )
 
  425                    xcomp->AddChild( 
node( wxT( 
"duplicate_pin_numbers_are_jumpers" ), wxT( 
"1" ) ) );
 
  427                const std::vector<std::set<wxString>>& jumperGroups = part->JumperPinGroups();
 
  429                if( !jumperGroups.empty() )
 
  432                    xcomp->AddChild( xproperty = 
node( wxT( 
"jumper_pin_groups" ) ) );
 
  434                    for( 
const std::set<wxString>& 
group : jumperGroups )
 
  436                        xproperty->AddChild( groupNode = 
node( wxT( 
"group" ) ) );
 
  438                        for( 
const wxString& pinName : 
group )
 
  439                            groupNode->AddChild( 
node( wxT( 
"pin" ), pinName ) );
 
  445            xcomp->AddChild( xsheetpath = 
node( wxT( 
"sheetpath" ) ) );
 
  447            xsheetpath->
AddAttribute( wxT( 
"names" ), sheet.PathHumanReadable() );
 
  448            xsheetpath->
AddAttribute( wxT( 
"tstamps" ), sheet.PathAsString() );
 
  451            std::vector<wxString> compClassNames =
 
  454            if( compClassNames.size() > 0 )
 
  456                XNODE* xcompclasslist;
 
  457                xcomp->AddChild( xcompclasslist = 
node( wxT( 
"component_classes" ) ) );
 
  459                for( 
const wxString& compClass : compClassNames )
 
  466            xcomp->AddChild( xunits = 
node( wxT( 
"tstamps" ) ) );
 
  468            auto     range = extra_units.equal_range( symbol );
 
  472            for( 
auto it = range.first; it != range.second; ++it )
 
  474                uuid = ( *it )->m_Uuid.AsString();
 
  481                xunits->AddChild( 
new XNODE( wxXML_TEXT_NODE, wxEmptyString, uuid ) );
 
  486            xunits->AddChild( 
new XNODE( wxXML_TEXT_NODE, wxEmptyString, uuid ) );
 
  490            xcomp->AddChild( xunitInfo = 
node( wxT( 
"units" ) ) );
 
  500                    xunitInfo->AddChild( xunit = 
node( wxT( 
"unit" ) ) );
 
  501                    xunit->
AddAttribute( wxT( 
"name" ), unitInfo.m_unitName );
 
  504                    xunit->AddChild( xpins = 
node( wxT( 
"pins" ) ) );
 
  506                    for( 
const wxString& number : unitInfo.m_pinNumbers )
 
  509                        xpins->AddChild( xpin = 
node( wxT( 
"pin" ) ) );
 
 
  545            xcomps->AddChild( xgroup = 
node( wxT( 
"group" ) ) );
 
  552            xgroup->AddChild( xmembers = 
node( wxT( 
"members" ) ) );
 
  559                    xmembers->AddChild( xmember = 
node( wxT( 
"member" ) ) );
 
  560                    xmember->
AddAttribute( wxT( 
"uuid" ), member->m_Uuid.AsString() );
 
 
  580        wxString ref = aSymbol->
GetRef( &aSymbolSheet );
 
  588                wxString ref2 = symbol2->
GetRef( &sheet );
 
  591                if( ref2.CmpNoCase( ref ) != 0 )
 
  594                if( otherUnit == primaryUnit )
 
  597                std::unordered_set<wxString> otherClassNames =
 
  599                compClassNames.insert( otherClassNames.begin(), otherClassNames.end() );
 
  604    std::vector<wxString> sortedCompClassNames( compClassNames.begin(), compClassNames.end() );
 
  605    std::sort( sortedCompClassNames.begin(), sortedCompClassNames.end(),
 
  606               []( 
const wxString& str1, 
const wxString& str2 )
 
  608                   return str1.Cmp( str2 ) < 0;
 
  611    return sortedCompClassNames;
 
 
  618    XNODE*      xdesign = 
node( wxT( 
"design" ) );
 
  624    wxFileName  sourceFileName;
 
  627    xdesign->AddChild( 
node( wxT( 
"source" ), 
m_schematic->GetFileName() ) );
 
  634    const std::map<wxString, wxString>& properties = 
m_schematic->Project().GetTextVars();
 
  636    for( 
const std::pair<const wxString, wxString>& prop : properties )
 
  638        xdesign->AddChild( xtextvar = 
node( wxT( 
"textvar" ), prop.second ) );
 
  645    unsigned sheetIndex = 1;     
 
  649        screen = sheet.LastScreen();
 
  651        xdesign->AddChild( xsheet = 
node( wxT( 
"sheet" ) ) );
 
  654        sheetTxt.Printf( wxT( 
"%u" ), sheetIndex++ );
 
  656        xsheet->
AddAttribute( wxT( 
"name" ), sheet.PathHumanReadable() );
 
  657        xsheet->
AddAttribute( wxT( 
"tstamps" ), sheet.PathAsString() );
 
  662        xsheet->AddChild( xtitleBlock = 
node( wxT( 
"title_block" ) ) );
 
  670        sourceFileName = wxFileName( screen->
GetFileName() );
 
  671        xtitleBlock->AddChild( 
node( wxT( 
"source" ), sourceFileName.GetFullName() ) );
 
  673        xtitleBlock->AddChild( xcomment = 
node( wxT( 
"comment" ) ) );
 
  677        xtitleBlock->AddChild( xcomment = 
node( wxT( 
"comment" ) ) );
 
  681        xtitleBlock->AddChild( xcomment = 
node( wxT( 
"comment" ) ) );
 
  685        xtitleBlock->AddChild( xcomment = 
node( wxT( 
"comment" ) ) );
 
  689        xtitleBlock->AddChild( xcomment = 
node( wxT( 
"comment" ) ) );
 
  693        xtitleBlock->AddChild( xcomment = 
node( wxT( 
"comment" ) ) );
 
  697        xtitleBlock->AddChild( xcomment = 
node( wxT( 
"comment" ) ) );
 
  701        xtitleBlock->AddChild( xcomment = 
node( wxT( 
"comment" ) ) );
 
  705        xtitleBlock->AddChild( xcomment = 
node( wxT( 
"comment" ) ) );
 
 
  716    XNODE*            xlibs = 
node( wxT( 
"libraries" ) );     
 
  721        wxString    libNickname = *it;
 
  728            xlibs->AddChild( xlibrary = 
node( wxT( 
"library" ) ) );
 
  729            xlibrary->
AddAttribute( wxT( 
"logical" ), libNickname );
 
  730            xlibrary->AddChild( 
node( wxT( 
"uri" ), *uri  ) );
 
 
  742    XNODE*                  xlibparts = 
node( wxT( 
"libparts" ) );   
 
  743    std::vector<SCH_FIELD*> fieldList;
 
  749        wxString libNickname = lcomp->GetLibId().GetLibNickname();;
 
  752        if( !libNickname.IsEmpty() )
 
  756        xlibparts->AddChild( xlibpart = 
node( wxT( 
"libpart" ) ) );
 
  758        xlibpart->
AddAttribute( wxT( 
"part" ), lcomp->GetName()  );
 
  761        if( !lcomp->GetDescription().IsEmpty() )
 
  762            xlibpart->AddChild( 
node( wxT( 
"description" ), lcomp->GetDescription() ) );
 
  764        if( !lcomp->GetDatasheetField().GetText().IsEmpty() )
 
  765            xlibpart->AddChild( 
node( wxT( 
"docs" ),  lcomp->GetDatasheetField().GetText() ) );
 
  768        if( lcomp->GetFPFilters().GetCount() )
 
  771            xlibpart->AddChild( xfootprints = 
node( wxT( 
"footprints" ) ) );
 
  773            for( 
unsigned i = 0; i < lcomp->GetFPFilters().GetCount(); ++i )
 
  775                if( !lcomp->GetFPFilters()[i].IsEmpty() )
 
  776                    xfootprints->AddChild( 
node( wxT( 
"fp" ), lcomp->GetFPFilters()[i] ) );
 
  782        lcomp->GetFields( fieldList );
 
  785        xlibpart->AddChild( xfields = 
node( 
"fields" ) );
 
  787        for( 
const SCH_FIELD* field : fieldList )
 
  790            xfields->AddChild( xfield = 
node( wxT( 
"field" ), field->GetText() ) );
 
  791            xfield->
AddAttribute( wxT( 
"name" ), field->GetCanonicalName() );
 
  797    std::vector<SCH_PIN*> pinList = lcomp->GetGraphicalPins( 0, 0 );
 
  809        for( 
int ii = 0; ii < (int)pinList.size()-1; ii++ )
 
  811            if( pinList[ii]->GetNumber() == pinList[ii+1]->GetNumber() )
 
  813                pinList.erase(pinList.begin() + ii + 1);
 
  818        wxLogTrace( 
"CVPCB_PINCOUNT",
 
  819                wxString::Format( 
"makeLibParts: lib='%s' part='%s' pinList(size)=%zu",
 
  820                          libNickname, lcomp->GetName(), pinList.size() ) );
 
  826            xlibpart->AddChild( pins = 
node( wxT( 
"pins" ) ) );
 
  828            for( 
unsigned i=0; i<pinList.size();  ++i )
 
  832                bool                     stackedValid = 
false;
 
  836                if( stackedValid && !expandedNums.empty() )
 
  838                    for( 
const wxString& num : expandedNums )
 
  841                        pins->AddChild( 
pin = 
node( wxT( 
"pin" ) ) );
 
  842                        pin->AddAttribute( wxT( 
"num" ), num );
 
  846                        wxLogTrace( 
"CVPCB_PINCOUNT",
 
  847                                    wxString::Format( 
"makeLibParts: -> pin num='%s' name='%s' (expanded)",
 
  854                    pins->AddChild( 
pin = 
node( wxT( 
"pin" ) ) );
 
  859                    wxLogTrace( 
"CVPCB_PINCOUNT",
 
  860                                wxString::Format( 
"makeLibParts: -> pin num='%s' name='%s'",
 
 
  878    XNODE*   xnet = 
nullptr;
 
  900        NET_RECORD( 
const wxString& aName ) :
 
  902                m_HasNoConnect( 
false )
 
  908        std::vector<NET_NODE> m_Nodes;
 
  911    std::vector<NET_RECORD*> nets;
 
  913    for( 
const auto& [ key, subgraphs ] : 
m_schematic->ConnectionGraph()->GetNetMap() )
 
  915        wxString    net_name = key.Name;
 
  916        NET_RECORD* net_record = 
nullptr;
 
  921        if( subgraphs.empty() )
 
  924        nets.emplace_back( 
new NET_RECORD( net_name ) );
 
  925        net_record = nets.back();
 
  929            bool nc = subgraph->GetNoConnect() && subgraph->GetNoConnect()->Type() == 
SCH_NO_CONNECT_T;
 
  932            if( net_record->m_Class.IsEmpty() && subgraph->GetDriver() )
 
  934                if( subgraph->GetDriver()->GetEffectiveNetClass() )
 
  936                    net_record->m_Class = subgraph->GetDriver()->GetEffectiveNetClass()->GetName();
 
  942                net_record->m_HasNoConnect = 
true;
 
  944            for( 
SCH_ITEM* item : subgraph->GetItems() )
 
  962                    net_record->m_Nodes.emplace_back( 
pin, sheet );
 
  969    std::sort( nets.begin(), nets.end(),
 
  970               []( 
const NET_RECORD* a, 
const NET_RECORD*b )
 
  972                   return StrNumCmp( a->m_Name, b->m_Name ) < 0;
 
  975    for( 
int i = 0; i < (int) nets.size(); ++i )
 
  977        NET_RECORD* net_record = nets[i];
 
  982        std::sort( net_record->m_Nodes.begin(), net_record->m_Nodes.end(),
 
  983                []( 
const NET_NODE& a, 
const NET_NODE& b )
 
  985                    wxString refA = a.m_Pin->GetParentSymbol()->GetRef( &a.m_Sheet );
 
  986                    wxString refB = b.m_Pin->GetParentSymbol()->GetRef( &b.m_Sheet );
 
  989                        return a.m_Pin->GetShownNumber() < b.m_Pin->GetShownNumber();
 
  998                []( 
const NET_NODE& a, 
const NET_NODE& b )
 
 1000                    wxString refA = a.m_Pin->GetParentSymbol()->GetRef( &a.m_Sheet );
 
 1001                    wxString refB = b.m_Pin->GetParentSymbol()->GetRef( &b.m_Sheet );
 
 1003                    return refA == refB && a.m_Pin->GetShownNumber() == b.m_Pin->GetShownNumber();
 
 1008        bool allNetPinsStacked = 
true;
 
 1010        if( net_record->m_Nodes.size() > 1 )
 
 1012            SCH_PIN* firstPin = net_record->m_Nodes.begin()->m_Pin;
 
 1014                    std::all_of( net_record->m_Nodes.begin() + 1, net_record->m_Nodes.end(),
 
 1017                                     return firstPin->GetParent() == node.m_Pin->GetParent()
 
 1018                                            && firstPin->GetPosition() == node.m_Pin->GetPosition()
 
 1019                                            && firstPin->GetName() == node.m_Pin->GetName();
 
 1023    for( 
const NET_NODE& netNode : net_record->m_Nodes )
 
 1025            wxString refText = netNode.m_Pin->GetParentSymbol()->GetRef( &netNode.m_Sheet );
 
 1028            if( refText[0] == wxChar( 
'#' ) )
 
 1033                netCodeTxt.Printf( wxT( 
"%d" ), i + 1 );
 
 1035                xnets->AddChild( xnet = 
node( wxT( 
"net" ) ) );
 
 1037                xnet->
AddAttribute( wxT( 
"name" ), net_record->m_Name );
 
 1038                xnet->
AddAttribute( wxT( 
"class" ), net_record->m_Class );
 
 1043            std::vector<wxString> nums = netNode.m_Pin->GetStackedPinNumbers();
 
 1044            wxString              baseName = netNode.m_Pin->GetShownName();
 
 1045            wxString              pinType = netNode.m_Pin->GetCanonicalElectricalTypeName();
 
 1048                        wxString::Format( 
"XML: net='%s' ref='%s' base='%s' shownNum='%s' expand=%zu",
 
 1049                                          net_record->m_Name, refText, baseName,
 
 1050                                          netNode.m_Pin->GetShownNumber(), nums.size() ) );
 
 1052            for( 
const wxString& num : nums )
 
 1054                xnet->AddChild( xnode = 
node( wxT( 
"node" ) ) );
 
 1058                wxString fullName = baseName.IsEmpty() ? num : baseName + wxT( 
"_" ) + num;
 
 1060                if( !baseName.IsEmpty() || nums.size() > 1 )
 
 1063                wxString typeAttr = pinType;
 
 1065                if( net_record->m_HasNoConnect
 
 1066                    && ( net_record->m_Nodes.size() == 1 || allNetPinsStacked ) )
 
 1068                    typeAttr += wxT( 
"+no_connect" );
 
 1070                                wxString::Format( 
"XML: marking node ref='%s' pin='%s' as no_connect",
 
 1079    for( NET_RECORD* record : nets )
 
 
 1087                                   const wxString& aTextualContent  )
 
 1089    XNODE* n = 
new XNODE( wxXML_ELEMENT_NODE, aName );
 
 1091    if( aTextualContent.Len() > 0 )     
 
 1092        n->AddChild( 
new XNODE( wxXML_TEXT_NODE, wxEmptyString, aTextualContent ) );
 
 
wxString GetBuildVersion()
Get the full KiCad version string.
 
A subgraph is a set of items that are electrically connected on a single sheet.
 
A base class for most all the KiCad significant classes used in schematics and boards.
 
virtual const wxString & GetText() const
Return the string associated with the text object.
 
wxString AsString() const
 
std::optional< wxString > GetFullURI(LIBRARY_TABLE_TYPE aType, const wxString &aNickname, bool aSubstituted=false) const
Return the full location specifying URI for the LIB, either in original UI form or in environment var...
 
const wxString GetUniStringLibItemName() const
Get strings for display messages in dialogs.
 
const wxString GetUniStringLibNickname() const
 
Define a library symbol object.
 
SCHEMATIC * m_schematic
The schematic we're generating a netlist for.
 
SCH_SYMBOL * findNextSymbol(EDA_ITEM *aItem, const SCH_SHEET_PATH &aSheetPath)
Check if the given symbol should be processed for netlisting.
 
std::set< LIB_SYMBOL *, LIB_SYMBOL_LESS_THAN > m_libParts
unique library symbols used. LIB_SYMBOL items are sorted by names
 
UNIQUE_STRINGS m_referencesAlreadyFound
Used for "multiple symbols per package" symbols to avoid processing a lib symbol more than once.
 
XNODE * makeDesignHeader()
Fill out a project "design" header into an XML node.
 
XNODE * makeLibraries()
Fill out an XML node with a list of used libraries and returns it.
 
bool WriteNetlist(const wxString &aOutFileName, unsigned aNetlistOptions, REPORTER &aReporter) override
Write generic netlist to aOutFileName.
 
XNODE * node(const wxString &aName, const wxString &aTextualContent=wxEmptyString)
A convenience function that creates a new XNODE with an optional textual child.
 
XNODE * makeListOfNets(unsigned aCtl)
Fill out an XML node with a list of nets and returns it.
 
void addSymbolFields(XNODE *aNode, SCH_SYMBOL *aSymbol, const SCH_SHEET_PATH &aSheet, const SCH_SHEET_LIST &aSheetList)
Holder for multi-unit symbol fields.
 
std::vector< wxString > getComponentClassNamesForAllSymbolUnits(SCH_SYMBOL *aSymbol, const SCH_SHEET_PATH &aSymbolSheet, const SCH_SHEET_LIST &aSheetList)
Finds all component class names attached to any sub-unit of a given symbol.
 
XNODE * makeSymbols(unsigned aCtl)
 
XNODE * makeRoot(unsigned aCtl=GNL_ALL)
Build the entire document tree for the generic export.
 
std::set< wxString > m_libraries
 
XNODE * makeLibParts()
Fill out an XML node with the unique library parts and returns it.
 
virtual LIBRARY_MANAGER & GetLibraryManager() const
 
Container for project specific data.
 
A pure virtual class used to derive REPORTER objects from.
 
wxString GetShownText(const SCH_SHEET_PATH *aPath, bool aAllowExtraText, int aDepth=0) const
 
A set of SCH_ITEMs (i.e., without duplicates).
 
Base class for any item which can be embedded within the SCHEMATIC container class,...
 
bool ResolveExcludedFromBoard() const
 
bool ResolveExcludedFromBOM(const SCH_SHEET_PATH *aInstance=nullptr, const wxString &aVariantName=wxEmptyString) const
 
bool ResolveDNP(const SCH_SHEET_PATH *aInstance=nullptr, const wxString &aVariantName=wxEmptyString) const
 
wxString GetShownNumber() const
 
std::vector< wxString > GetStackedPinNumbers(bool *aValid=nullptr) const
 
wxString GetCanonicalElectricalTypeName() const
 
wxString GetShownName() const
 
const wxString & GetFileName() const
 
const TITLE_BLOCK & GetTitleBlock() const
 
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
 
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
 
bool GetExcludedFromBOM() const
 
const SCH_SHEET * GetSheet(unsigned aIndex) const
 
bool GetExcludedFromBoard() const
 
wxString GetDescription() const override
 
bool UseLibIdLookup() const
 
wxString GetSchSymbolLibraryName() const
 
const wxString GetValue(bool aResolve, const SCH_SHEET_PATH *aPath, bool aAllowExtraText) const override
 
void GetFields(std::vector< SCH_FIELD * > &aVector, bool aVisibleOnly) const override
Populate a std::vector with SCH_FIELDs, sorted in ordinal order.
 
const wxString GetFootprintFieldText(bool aResolve, const SCH_SHEET_PATH *aPath, bool aAllowExtraText) const
 
wxString GetShownDescription(int aDepth=0) const override
 
const LIB_ID & GetLibId() const override
 
int GetUnitSelection(const SCH_SHEET_PATH *aSheet) const
Return the instance-specific unit selection for the given sheet path.
 
int GetUnitCount() const override
Return the number of units per package of the symbol.
 
std::unique_ptr< LIB_SYMBOL > & GetLibSymbolRef()
 
std::unordered_set< wxString > GetComponentClassNames(const SCH_SHEET_PATH *aPath) const
Return the component classes this symbol belongs in.
 
const wxString GetRef(const SCH_SHEET_PATH *aSheet, bool aIncludeUnit=false) const override
 
SCH_FIELD * GetField(FIELD_T aFieldType)
Return a mandatory field in this symbol.
 
Hold the information shown in the lower right corner of a plot, printout, or editing view.
 
const wxString & GetCompany() const
 
const wxString & GetRevision() const
 
const wxString & GetDate() const
 
const wxString & GetComment(int aIdx) const
 
const wxString & GetTitle() const
 
An extension of wxXmlNode that can format its contents as KiCad-style s-expressions.
 
void AddAttribute(const wxString &aName, const wxString &aValue) override
 
wxString ExpandTextVars(const wxString &aSource, const PROJECT *aProject, int aFlags)
 
const wxChar *const traceStackedPins
Flag to enable debug output for stacked pins handling in symbol/pin code.
 
void remove_duplicates(_Container &__c)
Deletes all duplicate values from __c.
 
static bool sortPinsByNumber(SCH_PIN *aPin1, SCH_PIN *aPin2)
 
PGM_BASE & Pgm()
The global program "get" accessor.
 
Class to handle a set of SCH_ITEMs.
 
int StrNumCmp(const wxString &aString1, const wxString &aString2, bool aIgnoreCase)
Compare two strings with alphanumerical content.
 
wxString UnescapeString(const wxString &aSource)
 
wxString GetISO8601CurrentDateTime()
 
@ DESCRIPTION
Field Description of part, i.e. "1/4W 1% Metal Film Resistor".
 
@ FOOTPRINT
Field Name Module PCB, i.e. "16DIP300".
 
@ DATASHEET
name of datasheet
 
wxString GetCanonicalFieldName(FIELD_T aFieldType)
 
wxLogTrace helper definitions.