36#include <wx/wfstream.h>
55 wxFFileOutputStream stream( aOutFileName );
63 return xdoc.Save( stream, 2 );
109 wxString description;
111 nlohmann::ordered_map<wxString, wxString> fields;
122 wxString ref = aSymbol->
GetRef( &aSheet );
132 wxString ref2 = symbol2->
GetRef( &sheet );
134 if( ref2.CmpNoCase( ref ) != 0 )
144 if( !candidate.IsEmpty() && ( unit < minUnit || value.IsEmpty() ) )
150 if( !candidate.IsEmpty() && ( unit < minUnit || footprint.IsEmpty() ) )
151 footprint = candidate;
158 if( !candidate.IsEmpty() && ( unit < minUnit ||
datasheet.IsEmpty() ) )
166 if( !candidate.IsEmpty() && ( unit < minUnit || description.IsEmpty() ) )
167 description = candidate;
172 if( field.IsMandatory() || field.IsPrivate() )
175 if( unit < minUnit || fields.count( field.GetName() ) == 0 )
178 fields[field.GetName()] = field.GetShownText( &aSheet,
false );
180 fields[field.GetName()] = field.GetText();
184 minUnit = std::min( unit, minUnit );
204 description = descriptionField->
GetShownText( &aSheet,
false );
206 description = descriptionField->
GetText();
210 if( field.IsMandatory() || field.IsPrivate() )
214 fields[field.GetName()] = field.GetShownText( &aSheet,
false );
216 fields[field.GetName()] = field.GetText();
228 aNode->AddChild(
node( wxT(
"value" ), wxT(
"~" ) ) );
230 if( footprint.size() )
236 if( description.size() )
240 aNode->AddChild( xfields =
node( wxT(
"fields" ) ) );
242 for(
const auto& [ fieldName, fieldValue ] : fields )
246 xfields->AddChild( xfield );
253 XNODE* xcomps =
node( wxT(
"components" ) );
275 b->GetRef( &sheet,
false ),
true ) < 0 );
278 std::set<
SCH_SYMBOL*,
decltype( cmp )> ordered_symbols( cmp );
279 std::multiset<
SCH_SYMBOL*,
decltype( cmp )> extra_units( cmp );
284 auto test = ordered_symbols.insert( symbol );
288 if( ( *(
test.first ) )->m_Uuid > symbol->
m_Uuid )
290 extra_units.insert( *(
test.first ) );
291 ordered_symbols.erase(
test.first );
292 ordered_symbols.insert( symbol );
296 extra_units.insert( symbol );
301 for(
EDA_ITEM* item : ordered_symbols )
321 xcomps->AddChild( xcomp =
node( wxT(
"comp" ) ) );
327 xcomp->AddChild( xlibsource =
node( wxT(
"libsource" ) ) );
358 std::vector<SCH_FIELD>& fields = symbol->
GetFields();
362 if( field.IsMandatory() || field.IsPrivate() )
365 xcomp->AddChild( xproperty =
node( wxT(
"property" ) ) );
366 xproperty->
AddAttribute( wxT(
"name" ), field.GetCanonicalName() );
369 xproperty->
AddAttribute( wxT(
"value" ), field.GetShownText( &sheet,
false ) );
371 xproperty->
AddAttribute( wxT(
"value" ), field.GetText() );
374 for(
const SCH_FIELD& sheetField : sheet.Last()->GetFields() )
376 xcomp->AddChild( xproperty =
node( wxT(
"property" ) ) );
377 xproperty->
AddAttribute( wxT(
"name" ), sheetField.GetCanonicalName() );
382 xproperty->
AddAttribute( wxT(
"value" ), sheetField.GetShownText( &sheet,
false ) );
384 xproperty->
AddAttribute( wxT(
"value" ), sheetField.GetText() );
389 xcomp->AddChild( xproperty =
node( wxT(
"property" ) ) );
390 xproperty->
AddAttribute( wxT(
"name" ), wxT(
"exclude_from_bom" ) );
395 xcomp->AddChild( xproperty =
node( wxT(
"property" ) ) );
396 xproperty->
AddAttribute( wxT(
"name" ), wxT(
"exclude_from_board" ) );
401 xcomp->AddChild( xproperty =
node( wxT(
"property" ) ) );
405 if(
const std::unique_ptr<LIB_SYMBOL>& part = symbol->
GetLibSymbolRef() )
407 if( part->GetKeyWords().size() )
409 xcomp->AddChild( xproperty =
node( wxT(
"property" ) ) );
410 xproperty->
AddAttribute( wxT(
"name" ), wxT(
"ki_keywords" ) );
411 xproperty->
AddAttribute( wxT(
"value" ), part->GetKeyWords() );
414 if( !part->GetFPFilters().IsEmpty() )
418 for(
const wxString&
filter : part->GetFPFilters() )
421 xcomp->AddChild( xproperty =
node( wxT(
"property" ) ) );
422 xproperty->
AddAttribute( wxT(
"name" ), wxT(
"ki_fp_filters" ) );
423 xproperty->
AddAttribute( wxT(
"value" ), filters.Trim(
false ) );
426 if( part->GetDuplicatePinNumbersAreJumpers() )
427 xcomp->AddChild(
node( wxT(
"duplicate_pin_numbers_are_jumpers" ), wxT(
"1" ) ) );
429 const std::vector<std::set<wxString>>& jumperGroups = part->JumperPinGroups();
431 if( !jumperGroups.empty() )
434 xcomp->AddChild( xproperty =
node( wxT(
"jumper_pin_groups" ) ) );
436 for(
const std::set<wxString>&
group : jumperGroups )
438 xproperty->AddChild( groupNode =
node( wxT(
"group" ) ) );
440 for(
const wxString& pinName :
group )
441 groupNode->AddChild(
node( wxT(
"pin" ), pinName ) );
447 xcomp->AddChild( xsheetpath =
node( wxT(
"sheetpath" ) ) );
449 xsheetpath->
AddAttribute( wxT(
"names" ), sheet.PathHumanReadable() );
450 xsheetpath->
AddAttribute( wxT(
"tstamps" ), sheet.PathAsString() );
453 std::vector<wxString> compClassNames =
456 if( compClassNames.size() > 0 )
458 XNODE* xcompclasslist;
459 xcomp->AddChild( xcompclasslist =
node( wxT(
"component_classes" ) ) );
461 for(
const wxString& compClass : compClassNames )
468 xcomp->AddChild( xunits =
node( wxT(
"tstamps" ) ) );
470 auto range = extra_units.equal_range( symbol );
474 for(
auto it = range.first; it != range.second; ++it )
476 uuid = ( *it )->m_Uuid.AsString();
483 xunits->AddChild(
new XNODE( wxXML_TEXT_NODE, wxEmptyString, uuid ) );
488 xunits->AddChild(
new XNODE( wxXML_TEXT_NODE, wxEmptyString, uuid ) );
492 xcomp->AddChild( xunitInfo =
node( wxT(
"units" ) ) );
502 xunitInfo->AddChild( xunit =
node( wxT(
"unit" ) ) );
503 xunit->
AddAttribute( wxT(
"name" ), unitInfo.m_unitName );
506 xunit->AddChild( xpins =
node( wxT(
"pins" ) ) );
508 for(
const wxString& number : unitInfo.m_pinNumbers )
511 xpins->AddChild( xpin =
node( wxT(
"pin" ) ) );
547 xcomps->AddChild( xgroup =
node( wxT(
"group" ) ) );
554 xgroup->AddChild( xmembers =
node( wxT(
"members" ) ) );
561 xmembers->AddChild( xmember =
node( wxT(
"member" ) ) );
562 xmember->
AddAttribute( wxT(
"uuid" ), member->m_Uuid.AsString() );
577 std::vector<SCH_SHEET_PATH> symbolSheets;
578 symbolSheets.push_back( aSymbolSheet );
585 const wxString ref = aSymbol->
GetRef( &aSymbolSheet );
593 wxString ref2 = symbol2->
GetRef( &sheet );
596 if( ref2.CmpNoCase( ref ) != 0 )
599 if( otherUnit == primaryUnit )
602 symbolSheets.push_back( sheet );
604 std::unordered_set<wxString> otherClassNames =
606 compClassNames.insert( otherClassNames.begin(), otherClassNames.end() );
616 if( symbolSheetPath.IsContainedWithin( sheetPath ) )
618 compClassNames.insert( sheetCompClasses.begin(), sheetCompClasses.end() );
623 std::vector<wxString> sortedCompClassNames( compClassNames.begin(), compClassNames.end() );
624 std::sort( sortedCompClassNames.begin(), sortedCompClassNames.end(),
625 [](
const wxString& str1,
const wxString& str2 )
627 return str1.Cmp( str2 ) < 0;
630 return sortedCompClassNames;
637 XNODE* xdesign =
node( wxT(
"design" ) );
643 wxFileName sourceFileName;
646 xdesign->AddChild(
node( wxT(
"source" ),
m_schematic->GetFileName() ) );
653 const std::map<wxString, wxString>& properties =
m_schematic->Project().GetTextVars();
655 for(
const std::pair<const wxString, wxString>& prop : properties )
657 xdesign->AddChild( xtextvar =
node( wxT(
"textvar" ), prop.second ) );
664 unsigned sheetIndex = 1;
668 screen = sheet.LastScreen();
670 xdesign->AddChild( xsheet =
node( wxT(
"sheet" ) ) );
673 sheetTxt.Printf( wxT(
"%u" ), sheetIndex++ );
675 xsheet->
AddAttribute( wxT(
"name" ), sheet.PathHumanReadable() );
676 xsheet->
AddAttribute( wxT(
"tstamps" ), sheet.PathAsString() );
681 xsheet->AddChild( xtitleBlock =
node( wxT(
"title_block" ) ) );
689 sourceFileName = wxFileName( screen->
GetFileName() );
690 xtitleBlock->AddChild(
node( wxT(
"source" ), sourceFileName.GetFullName() ) );
692 xtitleBlock->AddChild( xcomment =
node( wxT(
"comment" ) ) );
696 xtitleBlock->AddChild( xcomment =
node( wxT(
"comment" ) ) );
700 xtitleBlock->AddChild( xcomment =
node( wxT(
"comment" ) ) );
704 xtitleBlock->AddChild( xcomment =
node( wxT(
"comment" ) ) );
708 xtitleBlock->AddChild( xcomment =
node( wxT(
"comment" ) ) );
712 xtitleBlock->AddChild( xcomment =
node( wxT(
"comment" ) ) );
716 xtitleBlock->AddChild( xcomment =
node( wxT(
"comment" ) ) );
720 xtitleBlock->AddChild( xcomment =
node( wxT(
"comment" ) ) );
724 xtitleBlock->AddChild( xcomment =
node( wxT(
"comment" ) ) );
735 XNODE* xlibs =
node( wxT(
"libraries" ) );
740 wxString libNickname = *it;
747 xlibs->AddChild( xlibrary =
node( wxT(
"library" ) ) );
748 xlibrary->
AddAttribute( wxT(
"logical" ), libNickname );
749 xlibrary->AddChild(
node( wxT(
"uri" ), *uri ) );
761 XNODE* xlibparts =
node( wxT(
"libparts" ) );
762 std::vector<SCH_FIELD*> fieldList;
768 wxString libNickname = lcomp->GetLibId().GetLibNickname();;
771 if( !libNickname.IsEmpty() )
775 xlibparts->AddChild( xlibpart =
node( wxT(
"libpart" ) ) );
777 xlibpart->
AddAttribute( wxT(
"part" ), lcomp->GetName() );
780 if( !lcomp->GetDescription().IsEmpty() )
781 xlibpart->AddChild(
node( wxT(
"description" ), lcomp->GetDescription() ) );
783 if( !lcomp->GetDatasheetField().GetText().IsEmpty() )
784 xlibpart->AddChild(
node( wxT(
"docs" ), lcomp->GetDatasheetField().GetText() ) );
787 if( lcomp->GetFPFilters().GetCount() )
790 xlibpart->AddChild( xfootprints =
node( wxT(
"footprints" ) ) );
792 for(
unsigned i = 0; i < lcomp->GetFPFilters().GetCount(); ++i )
794 if( !lcomp->GetFPFilters()[i].IsEmpty() )
795 xfootprints->AddChild(
node( wxT(
"fp" ), lcomp->GetFPFilters()[i] ) );
801 lcomp->GetFields( fieldList );
804 xlibpart->AddChild( xfields =
node(
"fields" ) );
806 for(
const SCH_FIELD* field : fieldList )
809 xfields->AddChild( xfield =
node( wxT(
"field" ), field->GetText() ) );
810 xfield->
AddAttribute( wxT(
"name" ), field->GetCanonicalName() );
816 std::vector<SCH_PIN*> pinList = lcomp->GetGraphicalPins( 0, 0 );
828 for(
int ii = 0; ii < (int)pinList.size()-1; ii++ )
830 if( pinList[ii]->GetNumber() == pinList[ii+1]->GetNumber() )
832 pinList.erase(pinList.begin() + ii + 1);
837 wxLogTrace(
"CVPCB_PINCOUNT",
838 wxString::Format(
"makeLibParts: lib='%s' part='%s' pinList(size)=%zu",
839 libNickname, lcomp->GetName(), pinList.size() ) );
845 xlibpart->AddChild( pins =
node( wxT(
"pins" ) ) );
847 for(
unsigned i=0; i<pinList.size(); ++i )
851 bool stackedValid =
false;
855 if( stackedValid && !expandedNums.empty() )
857 for(
const wxString& num : expandedNums )
860 pins->AddChild(
pin =
node( wxT(
"pin" ) ) );
861 pin->AddAttribute( wxT(
"num" ), num );
865 wxLogTrace(
"CVPCB_PINCOUNT",
866 wxString::Format(
"makeLibParts: -> pin num='%s' name='%s' (expanded)",
873 pins->AddChild(
pin =
node( wxT(
"pin" ) ) );
878 wxLogTrace(
"CVPCB_PINCOUNT",
879 wxString::Format(
"makeLibParts: -> pin num='%s' name='%s'",
897 XNODE* xnet =
nullptr;
919 NET_RECORD(
const wxString& aName ) :
921 m_HasNoConnect(
false )
927 std::vector<NET_NODE> m_Nodes;
930 std::vector<NET_RECORD*> nets;
932 for(
const auto& [ key, subgraphs ] :
m_schematic->ConnectionGraph()->GetNetMap() )
934 wxString net_name = key.Name;
935 NET_RECORD* net_record =
nullptr;
940 if( subgraphs.empty() )
943 nets.emplace_back(
new NET_RECORD( net_name ) );
944 net_record = nets.back();
948 bool nc = subgraph->GetNoConnect() && subgraph->GetNoConnect()->Type() ==
SCH_NO_CONNECT_T;
951 if( net_record->m_Class.IsEmpty() && subgraph->GetDriver() )
953 if( subgraph->GetDriver()->GetEffectiveNetClass() )
955 net_record->m_Class = subgraph->GetDriver()->GetEffectiveNetClass()->GetName();
961 net_record->m_HasNoConnect =
true;
963 for(
SCH_ITEM* item : subgraph->GetItems() )
981 net_record->m_Nodes.emplace_back(
pin, sheet );
988 std::sort( nets.begin(), nets.end(),
989 [](
const NET_RECORD* a,
const NET_RECORD*b )
991 return StrNumCmp( a->m_Name, b->m_Name ) < 0;
994 for(
int i = 0; i < (int) nets.size(); ++i )
996 NET_RECORD* net_record = nets[i];
1001 std::sort( net_record->m_Nodes.begin(), net_record->m_Nodes.end(),
1002 [](
const NET_NODE& a,
const NET_NODE& b )
1004 wxString refA = a.m_Pin->GetParentSymbol()->GetRef( &a.m_Sheet );
1005 wxString refB = b.m_Pin->GetParentSymbol()->GetRef( &b.m_Sheet );
1008 return a.m_Pin->GetShownNumber() < b.m_Pin->GetShownNumber();
1017 [](
const NET_NODE& a,
const NET_NODE& b )
1019 wxString refA = a.m_Pin->GetParentSymbol()->GetRef( &a.m_Sheet );
1020 wxString refB = b.m_Pin->GetParentSymbol()->GetRef( &b.m_Sheet );
1022 return refA == refB && a.m_Pin->GetShownNumber() == b.m_Pin->GetShownNumber();
1027 bool allNetPinsStacked =
true;
1029 if( net_record->m_Nodes.size() > 1 )
1031 SCH_PIN* firstPin = net_record->m_Nodes.begin()->m_Pin;
1033 std::all_of( net_record->m_Nodes.begin() + 1, net_record->m_Nodes.end(),
1036 return firstPin->GetParent() == node.m_Pin->GetParent()
1037 && firstPin->GetPosition() == node.m_Pin->GetPosition()
1038 && firstPin->GetName() == node.m_Pin->GetName();
1042 for(
const NET_NODE& netNode : net_record->m_Nodes )
1044 wxString refText = netNode.m_Pin->GetParentSymbol()->GetRef( &netNode.m_Sheet );
1047 if( refText[0] == wxChar(
'#' ) )
1052 netCodeTxt.Printf( wxT(
"%d" ), i + 1 );
1054 xnets->AddChild( xnet =
node( wxT(
"net" ) ) );
1056 xnet->
AddAttribute( wxT(
"name" ), net_record->m_Name );
1057 xnet->
AddAttribute( wxT(
"class" ), net_record->m_Class );
1062 std::vector<wxString> nums = netNode.m_Pin->GetStackedPinNumbers();
1063 wxString baseName = netNode.m_Pin->GetShownName();
1064 wxString pinType = netNode.m_Pin->GetCanonicalElectricalTypeName();
1067 wxString::Format(
"XML: net='%s' ref='%s' base='%s' shownNum='%s' expand=%zu",
1068 net_record->m_Name, refText, baseName,
1069 netNode.m_Pin->GetShownNumber(), nums.size() ) );
1071 for(
const wxString& num : nums )
1073 xnet->AddChild( xnode =
node( wxT(
"node" ) ) );
1077 wxString fullName = baseName.IsEmpty() ? num : baseName + wxT(
"_" ) + num;
1079 if( !baseName.IsEmpty() || nums.size() > 1 )
1082 wxString typeAttr = pinType;
1084 if( net_record->m_HasNoConnect
1085 && ( net_record->m_Nodes.size() == 1 || allNetPinsStacked ) )
1087 typeAttr += wxT(
"+no_connect" );
1089 wxString::Format(
"XML: marking node ref='%s' pin='%s' as no_connect",
1098 for( NET_RECORD* record : nets )
1106 const wxString& aTextualContent )
1108 XNODE* n =
new XNODE( wxXML_ELEMENT_NODE, aName );
1110 if( aTextualContent.Len() > 0 )
1111 n->AddChild(
new XNODE( wxXML_TEXT_NODE, wxEmptyString, aTextualContent ) );
1128 auto getComponentClassFields = [&](
const std::vector<SCH_FIELD>& fields,
const SCH_SHEET_PATH* sheetPath )
1130 std::unordered_set<wxString> componentClasses;
1134 if( field.GetCanonicalName() == wxT(
"Component Class" ) )
1136 if( field.GetShownText( sheetPath,
false ) != wxEmptyString )
1137 componentClasses.insert( field.GetShownText( sheetPath,
false ) );
1141 return componentClasses;
1149 std::unordered_set<wxString> sheetComponentClasses;
1150 const std::unordered_set<SCH_RULE_AREA*>& sheetRuleAreas = sheetItem->
GetRuleAreaCache();
1156 std::unordered_set<wxString> ruleAreaComponentClasses =
1157 getComponentClassFields( label->GetFields(), &sheet );
1158 sheetComponentClasses.insert( ruleAreaComponentClasses.begin(), ruleAreaComponentClasses.end() );
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.
void getSheetComponentClasses()
std::map< SCH_SHEET_PATH, std::unordered_set< wxString > > m_sheetComponentClasses
Map of all sheets to component classes covering the whole sheet.
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,...
const std::unordered_set< SCH_RULE_AREA * > & GetRuleAreaCache() const
Get the cache of rule areas enclosing this item.
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
void push_back(SCH_SHEET *aSheet)
Forwarded method from std::vector.
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
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.