29#include <boost/ptr_container/ptr_vector.hpp>
31#include <nlohmann/json.hpp>
32#include <unordered_set>
52 const wxString& aPinFunction,
const wxString& aPinType ) :
91 const wxString& aReference,
92 const wxString& aValue,
94 const std::vector<KIID>& aKiids )
106 void AddNet(
const wxString& aPinName,
const wxString& aNetName,
const wxString& aPinFunction,
107 const wxString& aPinType )
109 m_nets.emplace_back( aPinName, aNetName, aPinFunction, aPinType );
134 void SetFields( nlohmann::ordered_map<wxString, wxString>& aFields )
169 bool IsLibSource(
const wxString& aLibrary,
const wxString& aName )
const
224 nlohmann::ordered_map<wxString, wxString>
m_fields;
314#define CTL_FOR_CVPCB (CTL_OMIT_NETS | CTL_OMIT_FILTERS | CTL_OMIT_EXTRA)
Used to store the component pin name to net name (and pin function) associations stored in a netlist.
const wxString & GetNetName() const
COMPONENT_NET(const wxString &aPinName, const wxString &aNetName, const wxString &aPinFunction, const wxString &aPinType)
int Format(OUTPUTFORMATTER *aOut, int aNestLevel, int aCtl)
bool operator<(const COMPONENT_NET &aNet) const
const wxString & GetPinFunction() const
const wxString & GetPinName() const
const wxString & GetPinType() const
Store all of the related footprint information found in a netlist.
const wxString & GetHumanReadablePath() const
const COMPONENT_NET & GetNet(unsigned aIndex) const
const KIID_PATH & GetPath() const
void SetValue(const wxString &aValue)
void SetFields(nlohmann::ordered_map< wxString, wxString > &aFields)
nlohmann::ordered_map< wxString, wxString > m_fields
Component-specific user fields found in the netlist.
void SetLibrary(const wxString &aLibrary)
void SetProperties(std::map< wxString, wxString > &aProps)
std::unordered_set< wxString > m_componentClassNames
Component classes for this footprint.
wxArrayString m_footprintFilters
const wxString & GetReference() const
void SetAltFPID(const LIB_ID &aFPID)
void Format(OUTPUTFORMATTER *aOut, int aNestLevel, int aCtl)
const wxString & GetValue() const
KIID_PATH m_path
A fully specified path to the component (but not the component: [ sheetUUID, sheetUUID,...
const nlohmann::ordered_map< wxString, wxString > & GetFields() const
std::vector< KIID > m_kiids
A vector of possible KIIDs corresponding to all units in a symbol.
const std::map< wxString, wxString > & GetProperties() const
void SetFPID(const LIB_ID &aFPID)
void SetPinCount(int aPinCount)
wxString m_name
The name of the component in m_library used when it was placed on the schematic.
LIB_ID m_altFpid
The alt LIB_ID of the footprint, when there are 2 different assigned footprints, One from the netlist...
const LIB_ID & GetAltFPID() const
wxString m_humanReadablePath
void SetFootprint(FOOTPRINT *aFootprint)
bool IsLibSource(const wxString &aLibrary, const wxString &aName) const
FOOTPRINT * GetFootprint(bool aRelease=false)
void SetFootprintFilters(const wxArrayString &aFilters)
void AddNet(const wxString &aPinName, const wxString &aNetName, const wxString &aPinFunction, const wxString &aPinType)
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.
const wxArrayString & GetFootprintFilters() const
std::vector< COMPONENT_NET > m_nets
list of nets shared by the component pins
const std::vector< KIID > & GetKIIDs() const
COMPONENT(const LIB_ID &aFPID, const wxString &aReference, const wxString &aValue, const KIID_PATH &aPath, const std::vector< KIID > &aKiids)
void SetHumanReadablePath(const wxString &aPath)
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
unsigned GetNetCount() const
std::unordered_set< wxString > & GetComponentClassNames()
const wxString & GetLibrary() const
void SetComponentClassNames(const std::unordered_set< wxString > &aClassNames)
const wxString & GetName() const
void SetName(const wxString &aName)
void SetReference(const wxString &aReference)
A logical library item identifier and consists of various portions much like a URI.
Store information read from a netlist along with the flags used to update the NETLIST in the BOARD.
void Format(const char *aDocName, OUTPUTFORMATTER *aOut, int aNestLevel, int aCtl=0)
bool GetReplaceFootprints() const
void SetReplaceFootprints(bool aReplace)
unsigned GetCount() const
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.
void Clear()
Remove all components from the netlist.
void SetFindByTimeStamp(bool aFindByTimeStamp)
COMPONENT * GetComponent(unsigned aIndex)
Return the COMPONENT at aIndex.
bool IsFindByTimeStamp() const
void FormatCvpcbNetlist(OUTPUTFORMATTER *aOut)
bool AnyFootprintsLinked() const
A pure virtual class used to derive REPORTER objects from.
std::vector< COMPONENT_NET > COMPONENT_NETS
boost::ptr_vector< COMPONENT > COMPONENTS