29#include <boost/ptr_container/ptr_vector.hpp>
32#include <unordered_set>
52 const wxString& aPinFunction,
const wxString& aPinType ) :
103 const wxString& aReference,
104 const wxString& aValue,
106 const std::vector<KIID>& aKiids )
120 void AddNet(
const wxString& aPinName,
const wxString& aNetName,
const wxString& aPinFunction,
121 const wxString& aPinType )
123 m_nets.emplace_back( aPinName, aNetName, aPinFunction, aPinType );
148 void SetFields( nlohmann::ordered_map<wxString, wxString> aFields )
183 bool IsLibSource(
const wxString& aLibrary,
const wxString& aName )
const
247 nlohmann::ordered_map<wxString, wxString>
m_fields;
378#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 std::vector< std::set< wxString > > & JumperPadGroups() const
const wxString & GetHumanReadablePath() const
const COMPONENT_NET & GetNet(unsigned aIndex) const
const KIID_PATH & GetPath() const
void SetValue(const wxString &aValue)
nlohmann::ordered_map< wxString, wxString > m_fields
Component-specific user fields found in the netlist.
void SetLibrary(const wxString &aLibrary)
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
void SetProperties(std::map< wxString, wxString > aProps)
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.
bool m_duplicatePadNumbersAreJumpers
Flag that this footprint should automatically treat sets of two or more pads with the same number as ...
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
std::vector< std::set< wxString > > m_jumperPadGroups
Jumper pad groups for this footprint.
void SetFootprint(FOOTPRINT *aFootprint)
bool IsLibSource(const wxString &aLibrary, const wxString &aName) const
FOOTPRINT * GetFootprint(bool aRelease=false)
NETLIST_GROUP * GetGroup() const
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
void SetFields(nlohmann::ordered_map< wxString, wxString > aFields)
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.
NETLIST_GROUP * m_group
Group membership for this footprint. Nullptr if none.
void SetDuplicatePadNumbersAreJumpers(bool aEnabled)
bool GetDuplicatePadNumbersAreJumpers() const
std::map< wxString, wxString > m_properties
Component-specific properties found in the netlist.
const LIB_ID & GetFPID() const
void SetGroup(NETLIST_GROUP *aGroup)
unsigned GetNetCount() const
std::unordered_set< wxString > & GetComponentClassNames()
const wxString & GetLibrary() const
void SetComponentClassNames(const std::unordered_set< wxString > &aClassNames)
const wxString & GetName() const
std::vector< std::set< wxString > > & JumperPadGroups()
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 AddGroup(NETLIST_GROUP *aGroup)
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.
COMPONENT * GetComponentByUuid(const KIID &aUuid)
Return a COMPONENT by aUuid.
void SetFindByTimeStamp(bool aFindByTimeStamp)
NETLIST_GROUP * GetGroupByUuid(const KIID &aUuid)
Return a NETLIST_GROUP by aUuid.
COMPONENT * GetComponent(unsigned aIndex)
Return the COMPONENT at aIndex.
void ApplyGroupMembership()
After groups and components are parsed, apply the group memberships to the internal components based ...
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
boost::ptr_vector< NETLIST_GROUP > NETLIST_GROUPS
std::vector< KIID > members