KiCad PCB EDA Suite
Loading...
Searching...
No Matches
NETLIST Class Reference

Store information read from a netlist along with the flags used to update the NETLIST in the BOARD. More...

#include <pcb_netlist.h>

Public Member Functions

 NETLIST ()
 
bool IsEmpty () const
 
void Clear ()
 Remove all components from the netlist.
 
unsigned GetCount () const
 
COMPONENTGetComponent (unsigned aIndex)
 Return the COMPONENT at aIndex.
 
void AddComponent (COMPONENT *aComponent)
 Add aComponent to the NETLIST.
 
void AddGroup (NETLIST_GROUP *aGroup)
 
NETLIST_GROUPGetGroupByUuid (const KIID &aUuid)
 Return a NETLIST_GROUP by aUuid.
 
void ApplyGroupMembership ()
 After groups and components are parsed, apply the group memberships to the internal components based on the group member UUIDs.
 
COMPONENTGetComponentByReference (const wxString &aReference)
 Return a COMPONENT by aReference.
 
COMPONENTGetComponentByPath (const KIID_PATH &aPath)
 Return a COMPONENT by aPath.
 
COMPONENTGetComponentByUuid (const KIID &aUuid)
 Return a COMPONENT by aUuid.
 
void SortByFPID ()
 
void SortByReference ()
 
void SetFindByTimeStamp (bool aFindByTimeStamp)
 
bool IsFindByTimeStamp () const
 
void SetReplaceFootprints (bool aReplace)
 
bool GetReplaceFootprints () const
 
bool AnyFootprintsLinked () const
 
void Format (const char *aDocName, OUTPUTFORMATTER *aOut, int aNestLevel, int aCtl=0)
 
void FormatCvpcbNetlist (OUTPUTFORMATTER *aOut)
 

Private Attributes

COMPONENTS m_components
 
NETLIST_GROUPS m_groups
 
bool m_findByTimeStamp
 
bool m_replaceFootprints
 

Detailed Description

Store information read from a netlist along with the flags used to update the NETLIST in the BOARD.

Definition at line 273 of file pcb_netlist.h.

Constructor & Destructor Documentation

◆ NETLIST()

NETLIST::NETLIST ( )
inline

Definition at line 276 of file pcb_netlist.h.

Member Function Documentation

◆ AddComponent()

void NETLIST::AddComponent ( COMPONENT aComponent)

Add aComponent to the NETLIST.

Note
If aComponent already exists in the NETLIST, aComponent is deleted to prevent memory leaks. An assertion is raised in debug builds.
Parameters
aComponentis the COMPONENT to save to the NETLIST.

Definition at line 162 of file pcb_netlist.cpp.

References m_components.

Referenced by LEGACY_NETLIST_READER::loadComponent(), and KICAD_NETLIST_PARSER::parseComponent().

◆ AddGroup()

void NETLIST::AddGroup ( NETLIST_GROUP aGroup)
Note
If aGroup already exists in the NETLIST, aGroup is deleted to prevent memory leaks. An assertion is raised in debug builds.
Parameters
aGroupis the NETLIST_GROUP to save to the NETLIST.

Definition at line 168 of file pcb_netlist.cpp.

References m_groups.

Referenced by KICAD_NETLIST_PARSER::parseGroup().

◆ AnyFootprintsLinked()

bool NETLIST::AnyFootprintsLinked ( ) const
Returns
true if any component with a footprint link is found.

Definition at line 276 of file pcb_netlist.cpp.

References empty(), and m_components.

Referenced by CVPCB_MAINFRAME::readNetListAndFpFiles().

◆ ApplyGroupMembership()

void NETLIST::ApplyGroupMembership ( )

After groups and components are parsed, apply the group memberships to the internal components based on the group member UUIDs.

Definition at line 288 of file pcb_netlist.cpp.

References GetComponentByUuid(), group, m_groups, and COMPONENT::SetGroup().

Referenced by KICAD_NETLIST_PARSER::Parse().

◆ Clear()

void NETLIST::Clear ( )
inline

Remove all components from the netlist.

Definition at line 290 of file pcb_netlist.h.

References m_components.

Referenced by CVPCB_MAINFRAME::readSchematicNetlist().

◆ Format()

void NETLIST::Format ( const char *  aDocName,
OUTPUTFORMATTER aOut,
int  aNestLevel,
int  aCtl = 0 
)

Definition at line 147 of file pcb_netlist.cpp.

References m_components, and OUTPUTFORMATTER::Print().

Referenced by FormatCvpcbNetlist().

◆ FormatCvpcbNetlist()

void NETLIST::FormatCvpcbNetlist ( OUTPUTFORMATTER aOut)
inline

Definition at line 380 of file pcb_netlist.h.

References CTL_FOR_CVPCB, and Format().

Referenced by CVPCB_MAINFRAME::SaveFootprintAssociation().

◆ GetComponent()

◆ GetComponentByPath()

COMPONENT * NETLIST::GetComponentByPath ( const KIID_PATH aPath)

Return a COMPONENT by aPath.

Parameters
aPathis the KIID_PATH [ sheetUUID, .., compUUID ] of the COMPONENT.
Returns
a pointer to the COMPONENT that matches aPath if found. Otherwise NULL.

Definition at line 202 of file pcb_netlist.cpp.

References m_components.

Referenced by BOARD_NETLIST_UPDATER::UpdateNetlist().

◆ GetComponentByReference()

COMPONENT * NETLIST::GetComponentByReference ( const wxString &  aReference)

Return a COMPONENT by aReference.

Parameters
aReferenceis the reference designator the COMPONENT.
Returns
a pointer to the COMPONENT that matches aReference if found. Otherwise NULL.

Definition at line 185 of file pcb_netlist.cpp.

References m_components.

Referenced by CMP_READER::Load(), LEGACY_NETLIST_READER::loadFootprintFilters(), KICAD_NETLIST_PARSER::parseNet(), DRC_TEST_PROVIDER_SCHEMATIC_PARITY::testNetlist(), and BOARD_NETLIST_UPDATER::UpdateNetlist().

◆ GetComponentByUuid()

COMPONENT * NETLIST::GetComponentByUuid ( const KIID aUuid)

Return a COMPONENT by aUuid.

Parameters
aUuidis the KIID of the COMPONENT.
Returns
a pointer to the COMPONENT that matches aUuid if found. Otherwise NULL.

Definition at line 228 of file pcb_netlist.cpp.

References m_components.

Referenced by ApplyGroupMembership().

◆ GetCount()

◆ GetGroupByUuid()

NETLIST_GROUP * NETLIST::GetGroupByUuid ( const KIID aUuid)

Return a NETLIST_GROUP by aUuid.

Parameters
aUuidis the KIID of the NETLIST_GROUP.
Returns
a pointer to the NETLIST_GROUP that matches aUuid if found. Otherwise NULL.

Definition at line 173 of file pcb_netlist.cpp.

References group, and m_groups.

Referenced by BOARD_NETLIST_UPDATER::updateGroups().

◆ GetReplaceFootprints()

bool NETLIST::GetReplaceFootprints ( ) const
inline

Definition at line 369 of file pcb_netlist.h.

References m_replaceFootprints.

Referenced by PCB_EDIT_FRAME::LoadFootprints().

◆ IsEmpty()

bool NETLIST::IsEmpty ( ) const
inline

◆ IsFindByTimeStamp()

bool NETLIST::IsFindByTimeStamp ( ) const
inline

Definition at line 366 of file pcb_netlist.h.

References m_findByTimeStamp.

Referenced by PCB_EDIT_FRAME::LoadFootprints().

◆ SetFindByTimeStamp()

void NETLIST::SetFindByTimeStamp ( bool  aFindByTimeStamp)
inline

Definition at line 365 of file pcb_netlist.h.

References m_findByTimeStamp.

Referenced by DIALOG_UPDATE_PCB::PerformUpdate().

◆ SetReplaceFootprints()

void NETLIST::SetReplaceFootprints ( bool  aReplace)
inline

Definition at line 368 of file pcb_netlist.h.

References m_replaceFootprints.

Referenced by DIALOG_UPDATE_PCB::PerformUpdate().

◆ SortByFPID()

void NETLIST::SortByFPID ( )

Definition at line 255 of file pcb_netlist.cpp.

References ByFPID(), and m_components.

Referenced by PCB_EDIT_FRAME::LoadFootprints().

◆ SortByReference()

void NETLIST::SortByReference ( )

Member Data Documentation

◆ m_components

◆ m_findByTimeStamp

bool NETLIST::m_findByTimeStamp
private

Definition at line 390 of file pcb_netlist.h.

Referenced by IsFindByTimeStamp(), and SetFindByTimeStamp().

◆ m_groups

NETLIST_GROUPS NETLIST::m_groups
private

Definition at line 387 of file pcb_netlist.h.

Referenced by AddGroup(), ApplyGroupMembership(), and GetGroupByUuid().

◆ m_replaceFootprints

bool NETLIST::m_replaceFootprints
private

Definition at line 391 of file pcb_netlist.h.

Referenced by GetReplaceFootprints(), and SetReplaceFootprints().


The documentation for this class was generated from the following files: