36 return aOut->
Print( aNestLevel,
"(pin_net %s %s)",
50 if( aFootprint ==
nullptr )
67 if( net.GetPinName() == aPinName )
91 path +=
'/' + pathStep.AsString();
99 aOut->
Print( nl + 1,
"(fields" );
101 for( std::pair<wxString, wxString> field :
m_fields )
102 aOut->
Print( nl + 2,
"\n(field (name %s) %s)", aOut->
Quotew( field.first ).c_str(),
103 aOut->
Quotew( field.second ).c_str() );
105 aOut->
Print( 0,
")\n" );
109 aOut->
Print( nl + 1,
"(property (name \"dnp\"))\n" );
112 aOut->
Print( nl + 1,
"(property (name \"exclude_from_bom\"))\n" );
117 aOut->
Print( nl+1,
"(fp_filters" );
122 aOut->
Print( 0,
")\n" );
127 int llen = aOut->
Print( nl+1,
"(nets " );
129 for(
unsigned i = 0; i <
m_nets.size(); ++i )
133 aOut->
Print( 0,
"\n" );
134 llen = aOut->
Print( nl+1,
" " );
137 llen +=
m_nets[i].Format( aOut, 0, aCtl );
140 aOut->
Print( 0,
")\n" );
143 aOut->
Print( nl,
")\n" );
151 aOut->
Print( nl,
"(%s\n", aDocName );
158 aOut->
Print( nl,
")\n" );
187 if( aUuidPath.empty() )
190 KIID comp_uuid = aUuidPath.back();
198 const std::vector<KIID>& kiids = component.GetKIIDs();
200 if( base != component.GetPath() )
203 if( std::find( kiids.begin(), kiids.end(), comp_uuid ) != kiids.end() )
Used to store the component pin name to net name (and pin function) associations stored in a netlist.
int Format(OUTPUTFORMATTER *aOut, int aNestLevel, int aCtl)
Store all of the related footprint information found in a netlist.
const COMPONENT_NET & GetNet(unsigned aIndex) const
nlohmann::ordered_map< wxString, wxString > m_fields
Component-specific user fields found in the netlist.
wxArrayString m_footprintFilters
const wxString & GetReference() const
void Format(OUTPUTFORMATTER *aOut, int aNestLevel, int aCtl)
KIID_PATH m_path
A fully specified path to the component (but not the component: [ sheetUUID, sheetUUID,...
std::vector< KIID > m_kiids
A vector of possible KIIDs corresponding to all units in a symbol.
wxString m_name
The name of the component in m_library used when it was placed on the schematic.
void SetFootprint(FOOTPRINT *aFootprint)
wxString m_library
The name of the component library where m_name was found.
LIB_ID m_fpid
The LIB_ID of the footprint assigned to the component.
std::vector< COMPONENT_NET > m_nets
list of nets shared by the component pins
static COMPONENT_NET m_emptyNet
std::unique_ptr< FOOTPRINT > m_footprint
The FOOTPRINT loaded for #m_FPID.
std::map< wxString, wxString > m_properties
Component-specific properties found in the netlist.
const LIB_ID & GetFPID() const
void Format(const char *aDocName, OUTPUTFORMATTER *aOut, int aNestLevel, int aCtl=0)
void AddComponent(COMPONENT *aComponent)
Add aComponent to the NETLIST.
COMPONENT * GetComponentByPath(const KIID_PATH &aPath)
Return a COMPONENT by aPath.
COMPONENT * GetComponentByReference(const wxString &aReference)
Return a COMPONENT by aReference.
bool AnyFootprintsLinked() const
#define CTL_OMIT_FP_UUID
Don't prefix the footprint UUID to the sheet path.
#define CTL_OMIT_FILTERS
Omit the ki_fp_filters attribute in .kicad_xxx files.
static bool empty(const wxTextEntryBase *aCtrl)
bool operator<(const COMPONENT &item1, const COMPONENT &item2)
Compare two COMPONENT objects by reference designator.
static bool ByFPID(const COMPONENT &ref, const COMPONENT &cmp)
A helper function used to sort the component list used by loadNewModules.
int StrNumCmp(const wxString &aString1, const wxString &aString2, bool aIgnoreCase)
Compare two strings with alphanumerical content.