28using namespace std::placeholders;
 
   35#include <netlist_reader/netlist_reader.h> 
   61                &aNetlist, aFilename, wxEmptyString ) );
 
   63        if( !netlistReader.get() )
 
   65            msg.Printf( 
_( 
"Cannot open netlist file '%s'." ), aFilename );
 
   71        netlistReader->LoadNetlist();
 
   76        msg.Printf( 
_( 
"Error loading netlist.\n%s" ), ioe.
What().GetData() );
 
 
  120                    if( netNamesCfg == 2 || netNamesCfg == 3 )
 
  123                else if( 
dynamic_cast<PAD*
>( aItem ) )
 
  125                    if( netNamesCfg == 1 || netNamesCfg == 3 )
 
  133                    text->ClearRenderCache();
 
  134                    text->ClearBoundingBoxCache();
 
  149    if( !newFootprints.empty() )
 
  152        std::copy( newFootprints.begin(), newFootprints.end(), std::back_inserter( items ) );
 
  155        *aRunDragCommand = 
true;
 
 
  177    for( 
unsigned ii = 0; ii < aNetlist.
GetCount(); ii++ )
 
  184            msg.Printf( 
_( 
"No footprint defined for symbol %s." ),
 
  198                path.push_back( uuid );
 
  200                if( ( fpOnBoard = 
m_pcb->FindFootprintByPath( 
path ) ) != 
nullptr )
 
  207        bool footprintMisMatch = fpOnBoard && fpOnBoard->
GetFPID() != component->
GetFPID();
 
  211            msg.Printf( 
_( 
"Footprint of %s changed: board footprint '%s', netlist footprint '%s'." ),
 
  221            footprintMisMatch = 
false;
 
  223        if( fpOnBoard && !footprintMisMatch )   
 
  226        if( component->
GetFPID() != lastFPID )
 
  234                msg.Printf( 
_( 
"%s footprint ID '%s' is not valid." ),
 
  247                lastFPID = component->
GetFPID();
 
  251                msg.Printf( 
_( 
"%s footprint '%s' not found in any libraries in the footprint " 
 
static TOOL_ACTION selectionClear
Clear the current selection.
 
static TOOL_ACTION selectItems
Select a list of items (specified as the event parameter)
 
Update the BOARD with a new netlist.
 
std::vector< FOOTPRINT * > GetAddedFootprints() const
 
Information pertinent to a Pcbnew printed circuit board.
 
void SynchronizeNetsAndNetClasses(bool aResetTrackAndViaSizes)
Copy NETCLASS info to each NET, based on NET membership in a NETCLASS.
 
COMPONENT_CLASS_MANAGER & GetComponentClassManager()
Gets the component class manager.
 
void InvalidateComponentClasses()
Invalidates any caches component classes and recomputes caches if required.
 
void RebuildRequiredCaches(FOOTPRINT *aFootprint=nullptr) const
Rebuilds any caches that may be required by custom assignment rules.
 
Store all of the related component information found in a netlist.
 
const KIID_PATH & GetPath() const
 
const wxString & GetReference() const
 
void SetFootprint(FOOTPRINT *aFootprint)
 
const std::vector< KIID > & GetKIIDs() const
 
const LIB_ID & GetFPID() const
 
void InitEngine(const wxFileName &aRulePath)
Initialize the DRC engine.
 
void SetMsgPanel(const std::vector< MSG_PANEL_ITEM > &aList)
Clear the message panel and populates it with the contents of aList.
 
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
 
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
 
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
 
virtual const wxString What() const
A composite of Problem() and Where()
 
An abstract base class for deriving all objects that can be added to a VIEW.
 
void UpdateAllItemsConditionally(int aUpdateFlags, std::function< bool(VIEW_ITEM *)> aCondition)
Update items in the view according to the given flags and condition.
 
A logical library item identifier and consists of various portions much like a URI.
 
const UTF8 & GetLibItemName() const
 
static NETLIST_READER * GetNetlistReader(NETLIST *aNetlist, const wxString &aNetlistFileName, const wxString &aCompFootprintFileName=wxEmptyString)
Attempt to determine the net list file type of aNetlistFileName and return the appropriate NETLIST_RE...
 
Store information read from a netlist along with the flags used to update the NETLIST in the BOARD.
 
bool GetReplaceFootprints() const
 
unsigned GetCount() const
 
COMPONENT * GetComponent(unsigned aIndex)
Return the COMPONENT at aIndex.
 
bool IsFindByTimeStamp() const
 
DISPLAY_OPTIONS m_Display
 
wxString GetDesignRulesPath()
Return the absolute path to the design rules file for the currently-loaded board.
 
PCBNEW_SETTINGS * GetPcbNewSettings() const
 
FOOTPRINT * loadFootprint(const LIB_ID &aFootprintId)
Attempt to load aFootprintId from the footprint library table.
 
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
 
void Compile_Ratsnest(bool aDisplayStatus)
Create the entire board ratsnest.
 
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
 
void SetLastPath(LAST_PATH_TYPE aType, const wxString &aLastPath)
Set the path of the last file successfully read.
 
bool ReadNetlistFromFile(const wxString &aFilename, NETLIST &aNetlist, REPORTER &aReporter)
Read a netlist from a file into a NETLIST object.
 
void OnNetlistChanged(BOARD_NETLIST_UPDATER &aUpdater, bool *aRunDragCommand)
Called after netlist is updated.
 
void LoadFootprints(NETLIST &aNetlist, REPORTER &aReporter)
Load the footprints for each #SCH_COMPONENT in aNetlist from the list of libraries.
 
static FP_LIB_TABLE * PcbFootprintLibs(PROJECT *aProject)
Return the table of footprint libraries without Kiway.
 
A pure virtual class used to derive REPORTER objects from.
 
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
Report a string with a given severity.
 
std::string::size_type size() const
 
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
 
This file is part of the common library.
 
std::vector< EDA_ITEM * > EDA_ITEMS
Define list of drawing items for screens.
 
@ REPAINT
Item needs to be redrawn.
 
@ GEOMETRY
Position or shape has changed.
 
Class that computes missing connections on a PCB.
 
A filename or source description, a problem input line, a line number, a byte offset,...