Browse Source
CvPcb footprint library table implementation.
CvPcb footprint library table implementation.
* Add code to CvPcb to handle assigning component footprints from the footprint library table instead of the search path method. * Add code to CvPcb to allow editing of the footprint library table. * CvPcb footprint and component panes display fully qualified FPID names. * Make CvPcb library pane display footprint library table nicknames instead of library file names. * Add code to FP_LIB_TABLE object to test the paths in the table against the list of libraries loaded from the project file. * Add code to FP_LIB_TABLE to convert assigned footprints in a NETLIST from legacy format to footprint library table format. * Split out COMPONENT_NET, COMPONENT, and NETLIST objects from netlist_reader files and create new pcb_netlist files. * Fix minor wxListView scroll bar sizing issues. * Add new token and code to save and load FPID nickname in board file. * Add new token and code to save and load FPID nickname in s-expression net list file. * Add WX_STRING_REPORT object to dump strings to a wxString object.pull/1/head
28 changed files with 1408 additions and 648 deletions
-
1common/CMakeLists.txt
-
26common/footprint_info.cpp
-
218common/fp_lib_table.cpp
-
12common/reporter.cpp
-
3cvpcb/CMakeLists.txt
-
50cvpcb/cfg.cpp
-
74cvpcb/class_DisplayFootprintsFrame.cpp
-
33cvpcb/class_footprints_listbox.cpp
-
16cvpcb/class_library_listbox.cpp
-
132cvpcb/cvframe.cpp
-
11cvpcb/cvpcb.h
-
3cvpcb/cvpcb_id.h
-
30cvpcb/cvpcb_mainframe.h
-
1cvpcb/cvstruct.h
-
6cvpcb/menubar.cpp
-
109cvpcb/readwrite_dlgs.cpp
-
17include/footprint_info.h
-
43include/fp_lib_table.h
-
19include/reporter.h
-
2pcbnew/class_board.cpp
-
2pcbnew/dialogs/dialog_netlist.cpp
-
2pcbnew/kicad_netlist_reader.cpp
-
1pcbnew/legacy_netlist_reader.cpp
-
1pcbnew/netlist.cpp
-
268pcbnew/netlist_reader.cpp
-
331pcbnew/netlist_reader.h
-
278pcbnew/pcb_netlist.cpp
-
367pcbnew/pcb_netlist.h
@ -0,0 +1,278 @@ |
|||
/**
|
|||
* @file pcb_netlist.cpp |
|||
*/ |
|||
/*
|
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 1992-2011 Jean-Pierre Charras. |
|||
* Copyright (C) 2013 Wayne Stambaugh <stambaughw@verizon.net>. |
|||
* Copyright (C) 1992-2011 KiCad Developers, see change_log.txt for contributors. |
|||
* |
|||
* This program is free software; you can redistribute it and/or |
|||
* modify it under the terms of the GNU General Public License |
|||
* as published by the Free Software Foundation; either version 2 |
|||
* of the License, or (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program; if not, you may find one here: |
|||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|||
* or you may search the http://www.gnu.org website for the version 2 license,
|
|||
* or you may write to the Free Software Foundation, Inc., |
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
|||
*/ |
|||
|
|||
|
|||
#include <macros.h>
|
|||
#include <kicad_string.h>
|
|||
#include <reporter.h>
|
|||
|
|||
#include <pcb_netlist.h>
|
|||
#include <class_module.h>
|
|||
|
|||
|
|||
#if defined(DEBUG)
|
|||
/**
|
|||
* Function NestedSpace |
|||
* outputs nested space for pretty indenting. |
|||
* @param aNestLevel The nest count |
|||
* @param aReporter A reference to a #REPORTER object where to output. |
|||
* @return REPORTER& for continuation. |
|||
**/ |
|||
static REPORTER& NestedSpace( int aNestLevel, REPORTER& aReporter ) |
|||
{ |
|||
for( int i = 0; i < aNestLevel; ++i ) |
|||
aReporter.Report( wxT( " " ) ); |
|||
|
|||
return aReporter; |
|||
} |
|||
|
|||
|
|||
void COMPONENT_NET::Show( int aNestLevel, REPORTER& aReporter ) |
|||
{ |
|||
NestedSpace( aNestLevel, aReporter ); |
|||
aReporter.Report( wxString::Format( wxT( "<pin_name=%s net_name=%s>\n" ), |
|||
GetChars( m_pinName ), GetChars( m_netName ) ) ); |
|||
} |
|||
#endif
|
|||
|
|||
|
|||
void COMPONENT::SetModule( MODULE* aModule ) |
|||
{ |
|||
m_footprint.reset( aModule ); |
|||
|
|||
if( aModule == NULL ) |
|||
return; |
|||
|
|||
aModule->SetReference( m_reference ); |
|||
aModule->SetValue( m_value ); |
|||
aModule->SetFPID( m_fpid ); |
|||
aModule->SetPath( m_timeStamp ); |
|||
} |
|||
|
|||
|
|||
COMPONENT_NET COMPONENT::m_emptyNet; |
|||
|
|||
|
|||
const COMPONENT_NET& COMPONENT::GetNet( const wxString& aPinName ) |
|||
{ |
|||
for( unsigned i = 0; i < m_nets.size(); i++ ) |
|||
{ |
|||
if( m_nets[i].GetPinName() == aPinName ) |
|||
return m_nets[i]; |
|||
} |
|||
|
|||
return m_emptyNet; |
|||
} |
|||
|
|||
|
|||
bool COMPONENT::MatchesFootprintFilters( const wxString& aFootprintName ) const |
|||
{ |
|||
if( m_footprintFilters.GetCount() == 0 ) |
|||
return true; |
|||
|
|||
// The matching is case insensitive
|
|||
wxString name = aFootprintName.Upper(); |
|||
|
|||
for( unsigned ii = 0; ii < m_footprintFilters.GetCount(); ii++ ) |
|||
{ |
|||
if( name.Matches( m_footprintFilters[ii].Upper() ) ) |
|||
return true; |
|||
} |
|||
|
|||
return false; |
|||
} |
|||
|
|||
|
|||
#if defined(DEBUG)
|
|||
void COMPONENT::Show( int aNestLevel, REPORTER& aReporter ) |
|||
{ |
|||
NestedSpace( aNestLevel, aReporter ); |
|||
aReporter.Report( wxT( "<component>\n" ) ); |
|||
NestedSpace( aNestLevel+1, aReporter ); |
|||
aReporter.Report( wxString::Format( wxT( "<ref=%s value=%s name=%s library=%s fpid=%s " |
|||
"timestamp=%s>\n" ), |
|||
GetChars( m_reference ), GetChars( m_value ), |
|||
GetChars( m_name ), GetChars( m_library ), |
|||
m_fpid.Format().c_str(), |
|||
GetChars( m_timeStamp ) ) ); |
|||
|
|||
if( !m_footprintFilters.IsEmpty() ) |
|||
{ |
|||
NestedSpace( aNestLevel+1, aReporter ); |
|||
aReporter.Report( wxT( "<fp_filters>\n" ) ); |
|||
|
|||
for( unsigned i = 0; i < m_footprintFilters.GetCount(); i++ ) |
|||
{ |
|||
NestedSpace( aNestLevel+2, aReporter ); |
|||
aReporter.Report( wxString::Format( wxT( "<%s>\n" ), |
|||
GetChars( m_footprintFilters[i] ) ) ); |
|||
} |
|||
|
|||
NestedSpace( aNestLevel+1, aReporter ); |
|||
aReporter.Report( wxT( "</fp_filters>\n" ) ); |
|||
} |
|||
|
|||
if( !m_nets.empty() ) |
|||
{ |
|||
NestedSpace( aNestLevel+1, aReporter ); |
|||
aReporter.Report( wxT( "<nets>\n" ) ); |
|||
|
|||
for( unsigned i = 0; i < m_nets.size(); i++ ) |
|||
m_nets[i].Show( aNestLevel+3, aReporter ); |
|||
|
|||
NestedSpace( aNestLevel+1, aReporter ); |
|||
aReporter.Report( "</nets>\n" ); |
|||
} |
|||
|
|||
NestedSpace( aNestLevel, aReporter ); |
|||
aReporter.Report( "</component>\n" ); |
|||
} |
|||
#endif
|
|||
|
|||
|
|||
void NETLIST::AddComponent( COMPONENT* aComponent ) |
|||
{ |
|||
m_components.push_back( aComponent ); |
|||
} |
|||
|
|||
|
|||
COMPONENT* NETLIST::GetComponentByReference( const wxString& aReference ) |
|||
{ |
|||
COMPONENT* component = NULL; |
|||
|
|||
for( unsigned i = 0; i < m_components.size(); i++ ) |
|||
{ |
|||
if( m_components[i].GetReference() == aReference ) |
|||
{ |
|||
component = &m_components[i]; |
|||
break; |
|||
} |
|||
} |
|||
|
|||
return component; |
|||
} |
|||
|
|||
|
|||
COMPONENT* NETLIST::GetComponentByTimeStamp( const wxString& aTimeStamp ) |
|||
{ |
|||
COMPONENT* component = NULL; |
|||
|
|||
for( unsigned i = 0; i < m_components.size(); i++ ) |
|||
{ |
|||
if( m_components[i].GetTimeStamp() == aTimeStamp ) |
|||
{ |
|||
component = &m_components[i]; |
|||
break; |
|||
} |
|||
} |
|||
|
|||
return component; |
|||
} |
|||
|
|||
|
|||
/**
|
|||
* Function ByFPID |
|||
* is a helper function used to sort the component list used by loadNewModules. |
|||
*/ |
|||
static bool ByFPID( const COMPONENT& ref, const COMPONENT& cmp ) |
|||
{ |
|||
return ref.GetFPID() > cmp.GetFPID(); |
|||
} |
|||
|
|||
|
|||
void NETLIST::SortByFPID() |
|||
{ |
|||
m_components.sort( ByFPID ); |
|||
} |
|||
|
|||
|
|||
/**
|
|||
* Operator < |
|||
* compares two #COMPONENT objects by reference designator. |
|||
*/ |
|||
bool operator < ( const COMPONENT& item1, const COMPONENT& item2 ) |
|||
{ |
|||
return StrNumCmp( item1.GetReference(), item2.GetReference(), INT_MAX, true ) < 0; |
|||
} |
|||
|
|||
|
|||
void NETLIST::SortByReference() |
|||
{ |
|||
m_components.sort(); |
|||
} |
|||
|
|||
|
|||
bool NETLIST::AnyFootprintsLinked() const |
|||
{ |
|||
for( unsigned i = 0; i < m_components.size(); i++ ) |
|||
{ |
|||
if( !m_components[i].GetFPID().empty() ) |
|||
return true; |
|||
} |
|||
|
|||
return false; |
|||
} |
|||
|
|||
|
|||
bool NETLIST::AllFootprintsLinked() const |
|||
{ |
|||
for( unsigned i = 0; i < m_components.size(); i++ ) |
|||
{ |
|||
if( m_components[i].GetFPID().empty() ) |
|||
return false; |
|||
} |
|||
|
|||
return true; |
|||
} |
|||
|
|||
|
|||
#if defined( DEBUG )
|
|||
void NETLIST::Show( int aNestLevel, REPORTER& aReporter ) |
|||
{ |
|||
NestedSpace( aNestLevel, aReporter ); |
|||
aReporter.Report( "<netlist>\n" ); |
|||
|
|||
if( !m_components.empty() ) |
|||
{ |
|||
NestedSpace( aNestLevel+1, aReporter ); |
|||
aReporter.Report( "<components>\n" ); |
|||
|
|||
for( unsigned i = 0; i < m_components.size(); i++ ) |
|||
{ |
|||
m_components[i].Show( aNestLevel+2, aReporter ); |
|||
} |
|||
|
|||
NestedSpace( aNestLevel+1, aReporter ); |
|||
|
|||
aReporter.Report( "</components>\n" ); |
|||
} |
|||
|
|||
NestedSpace( aNestLevel, aReporter ); |
|||
aReporter.Report( "</netlist>\n" ); |
|||
} |
|||
#endif
|
@ -0,0 +1,367 @@ |
|||
#ifndef PCB_NETLIST_H |
|||
#define PCB_NETLIST_H |
|||
|
|||
/** |
|||
* @file pcb_netlist.h |
|||
*/ |
|||
|
|||
/* |
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2012 Jean-Pierre Charras. |
|||
* Copyright (C) 2013 Wayne Stambaugh <stambaughw@verizon.net>. |
|||
* Copyright (C) 2012 KiCad Developers, see CHANGELOG.TXT for contributors. |
|||
* |
|||
* This program is free software; you can redistribute it and/or |
|||
* modify it under the terms of the GNU General Public License |
|||
* as published by the Free Software Foundation; either version 2 |
|||
* of the License, or (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program; if not, you may find one here: |
|||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
|||
* or you may search the http://www.gnu.org website for the version 2 license, |
|||
* or you may write to the Free Software Foundation, Inc., |
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
|||
*/ |
|||
|
|||
#include <boost/ptr_container/ptr_vector.hpp> |
|||
#include <wx/arrstr.h> |
|||
|
|||
#include <fpid.h> |
|||
|
|||
|
|||
class MODULE; |
|||
class REPORTER; |
|||
|
|||
|
|||
/** |
|||
* Class COMPONENT_NET |
|||
* is used to store the component pin name to net name associations stored in a netlist. |
|||
*/ |
|||
class COMPONENT_NET |
|||
{ |
|||
wxString m_pinName; |
|||
wxString m_netNumber; |
|||
wxString m_netName; |
|||
|
|||
public: |
|||
COMPONENT_NET() {} |
|||
|
|||
COMPONENT_NET( const wxString& aPinName, const wxString& aNetName ) |
|||
{ |
|||
m_pinName = aPinName; |
|||
m_netName = aNetName; |
|||
} |
|||
|
|||
const wxString& GetPinName() const { return m_pinName; } |
|||
|
|||
const wxString& GetNetName() const { return m_netName; } |
|||
|
|||
bool IsValid() const { return !m_pinName.IsEmpty(); } |
|||
|
|||
bool operator <( const COMPONENT_NET& aNet ) const |
|||
{ |
|||
return m_pinName < aNet.m_pinName; |
|||
} |
|||
|
|||
#if defined(DEBUG) |
|||
/** |
|||
* Function Show |
|||
* is used to output the object tree, currently for debugging only. |
|||
* @param aNestLevel An aid to prettier tree indenting, and is the level |
|||
* of nesting of this object within the overall tree. |
|||
* @param aReporter A reference to a #REPORTER object to output to. |
|||
*/ |
|||
virtual void Show( int aNestLevel, REPORTER& aReporter ); |
|||
#endif |
|||
}; |
|||
|
|||
|
|||
typedef std::vector< COMPONENT_NET > COMPONENT_NETS; |
|||
|
|||
|
|||
/** |
|||
* Class COMPONENT |
|||
* is used to store components and all of their related information found in a netlist. |
|||
*/ |
|||
class COMPONENT |
|||
{ |
|||
COMPONENT_NETS m_nets; |
|||
wxArrayString m_footprintFilters; ///< Footprint filters found in netlist. |
|||
wxString m_reference; ///< The component reference designator found in netlist. |
|||
wxString m_value; ///< The component value found in netlist. |
|||
|
|||
// ZZZ This timestamp is string, not time_t |
|||
wxString m_timeStamp; ///< The component full time stamp found in netlist. |
|||
|
|||
/// The name of the component in #m_library used when it was placed on the schematic.. |
|||
wxString m_name; |
|||
|
|||
/// The name of the component library where #m_name was found. |
|||
wxString m_library; |
|||
|
|||
/// The #FPID of the footprint assigned to the component. |
|||
FPID m_fpid; |
|||
|
|||
/// The #MODULE loaded for #m_footprintName found in #m_footprintLib. |
|||
std::auto_ptr< MODULE > m_footprint; |
|||
|
|||
/// Set to true if #m_footprintName or #m_footprintLib was changed when the footprint |
|||
/// link file was read. |
|||
bool m_footprintChanged; |
|||
|
|||
static COMPONENT_NET m_emptyNet; |
|||
|
|||
public: |
|||
COMPONENT( const FPID& aFPID, |
|||
const wxString& aReference, |
|||
const wxString& aValue, |
|||
const wxString& aTimeStamp ) |
|||
{ |
|||
m_fpid = aFPID; |
|||
m_reference = aReference; |
|||
m_value = aValue; |
|||
m_timeStamp = aTimeStamp; |
|||
m_footprintChanged = false; |
|||
} |
|||
|
|||
virtual ~COMPONENT() { }; |
|||
|
|||
void AddNet( const wxString& aPinName, const wxString& aNetName ) |
|||
{ |
|||
m_nets.push_back( COMPONENT_NET( aPinName, aNetName ) ); |
|||
} |
|||
|
|||
unsigned GetNetCount() const { return m_nets.size(); } |
|||
|
|||
const COMPONENT_NET& GetNet( unsigned aIndex ) const { return m_nets[aIndex]; } |
|||
|
|||
const COMPONENT_NET& GetNet( const wxString& aPinName ); |
|||
|
|||
void SortPins() { sort( m_nets.begin(), m_nets.end() ); } |
|||
|
|||
void SetName( const wxString& aName ) { m_name = aName;} |
|||
const wxString& GetName() const { return m_name; } |
|||
|
|||
void SetLibrary( const wxString& aLibrary ) { m_library = aLibrary; } |
|||
const wxString& GetLibrary() const { return m_library; } |
|||
|
|||
const wxString& GetReference() const { return m_reference; } |
|||
|
|||
const wxString& GetValue() const { return m_value; } |
|||
|
|||
void SetFPID( const FPID& aFPID ) |
|||
{ |
|||
m_footprintChanged = !m_fpid.empty() && (m_fpid != aFPID); |
|||
m_fpid = aFPID; |
|||
} |
|||
|
|||
const FPID& GetFPID() const { return m_fpid; } |
|||
|
|||
const wxString& GetTimeStamp() const { return m_timeStamp; } |
|||
|
|||
void SetFootprintFilters( const wxArrayString& aFilterList ) |
|||
{ |
|||
m_footprintFilters = aFilterList; |
|||
} |
|||
|
|||
const wxArrayString& GetFootprintFilters() const { return m_footprintFilters; } |
|||
|
|||
/** |
|||
* Function MatchesFootprintFilters |
|||
* |
|||
* @return true if \a aFootprintName matches any of the footprint filters or no footprint |
|||
* filters are defined. |
|||
*/ |
|||
bool MatchesFootprintFilters( const wxString& aFootprintName ) const; |
|||
|
|||
MODULE* GetModule( bool aRelease = false ) |
|||
{ |
|||
return ( aRelease ) ? m_footprint.release() : m_footprint.get(); |
|||
} |
|||
|
|||
void SetModule( MODULE* aModule ); |
|||
|
|||
bool IsLibSource( const wxString& aLibrary, const wxString& aName ) const |
|||
{ |
|||
return aLibrary == m_library && aName == m_name; |
|||
} |
|||
|
|||
bool FootprintChanged() const { return m_footprintChanged; } |
|||
|
|||
#if defined(DEBUG) |
|||
/** |
|||
* Function Show |
|||
* is used to output the object tree, currently for debugging only. |
|||
* @param aNestLevel An aid to prettier tree indenting, and is the level |
|||
* of nesting of this object within the overall tree. |
|||
* @param aReporter A reference to a #REPORTER object to output to. |
|||
*/ |
|||
virtual void Show( int aNestLevel, REPORTER& aReporter ); |
|||
#endif |
|||
}; |
|||
|
|||
|
|||
typedef boost::ptr_vector< COMPONENT > COMPONENTS; |
|||
typedef COMPONENTS::iterator COMPONENTS_ITER; |
|||
typedef COMPONENTS::const_iterator COMPONENTS_CITER; |
|||
|
|||
|
|||
/** |
|||
* Class NETLIST |
|||
* stores all of information read from a netlist along with the flags used to update |
|||
* the NETLIST in the #BOARD. |
|||
*/ |
|||
class NETLIST |
|||
{ |
|||
COMPONENTS m_components; ///< Components found in the netlist. |
|||
|
|||
/// Remove footprints from #BOARD not found in netlist when true. |
|||
bool m_deleteExtraFootprints; |
|||
|
|||
/// Do not actually make any changes. Only report changes to #BOARD from netlist |
|||
/// when true. |
|||
bool m_isDryRun; |
|||
|
|||
/// Find component by time stamp if true or reference designator if false. |
|||
bool m_findByTimeStamp; |
|||
|
|||
/// Replace component footprints when they differ from the netlist if true. |
|||
bool m_replaceFootprints; |
|||
|
|||
public: |
|||
NETLIST() : |
|||
m_deleteExtraFootprints( false ), |
|||
m_isDryRun( false ), |
|||
m_findByTimeStamp( false ), |
|||
m_replaceFootprints( false ) |
|||
{ |
|||
} |
|||
|
|||
/** |
|||
* Function IsEmpty() |
|||
* @return true if there are no components in the netlist. |
|||
*/ |
|||
bool IsEmpty() const { return m_components.empty(); } |
|||
|
|||
/** |
|||
* Function Clear |
|||
* removes all components from the netlist. |
|||
*/ |
|||
void Clear() { m_components.clear(); } |
|||
|
|||
/** |
|||
* Function GetCount |
|||
* @return the number of components in the netlist. |
|||
*/ |
|||
unsigned GetCount() const { return m_components.size(); } |
|||
|
|||
/** |
|||
* Function GetComponent |
|||
* returns the #COMPONENT at \a aIndex. |
|||
* |
|||
* @param aIndex the index in #m_components to fetch. |
|||
* @return a pointer to the #COMPONENT at \a Index. |
|||
*/ |
|||
COMPONENT* GetComponent( unsigned aIndex ) { return &m_components[ aIndex ]; } |
|||
|
|||
/** |
|||
* Function AddComponent |
|||
* adds \a aComponent to the NETLIST. |
|||
* |
|||
* @note If \a aComponent already exists in the NETLIST, \a aComponent is deleted |
|||
* to prevent memory leaks. An assertion is raised in debug builds. |
|||
* |
|||
* @param aComponent is the COMPONENT to save to the NETLIST. |
|||
*/ |
|||
void AddComponent( COMPONENT* aComponent ); |
|||
|
|||
/* |
|||
* Function GetComponentByReference |
|||
* returns a #COMPONENT by \a aReference. |
|||
* |
|||
* @param aReference is the reference designator the #COMPONENT. |
|||
* @return a pointer to the #COMPONENT that matches \a aReference if found. Otherwise NULL. |
|||
*/ |
|||
COMPONENT* GetComponentByReference( const wxString& aReference ); |
|||
|
|||
/* |
|||
* Function GetComponentByTimeStamp |
|||
* returns a #COMPONENT by \a aTimeStamp. |
|||
* |
|||
* @param aTimeStamp is the time stamp the #COMPONENT. |
|||
* @return a pointer to the #COMPONENT that matches \a aTimeStamp if found. Otherwise NULL. |
|||
*/ |
|||
COMPONENT* GetComponentByTimeStamp( const wxString& aTimeStamp ); |
|||
|
|||
void SortByFPID(); |
|||
|
|||
void SortByReference(); |
|||
|
|||
void SetDeleteExtraFootprints( bool aDeleteExtraFootprints ) |
|||
{ |
|||
m_deleteExtraFootprints = aDeleteExtraFootprints; |
|||
} |
|||
|
|||
bool GetDeleteExtraFootprints() const { return m_deleteExtraFootprints; } |
|||
|
|||
void SetIsDryRun( bool aIsDryRun ) { m_isDryRun = aIsDryRun; } |
|||
|
|||
bool IsDryRun() const { return m_isDryRun; } |
|||
|
|||
void SetFindByTimeStamp( bool aFindByTimeStamp ) { m_findByTimeStamp = aFindByTimeStamp; } |
|||
|
|||
bool IsFindByTimeStamp() const { return m_findByTimeStamp; } |
|||
|
|||
void SetReplaceFootprints( bool aReplaceFootprints ) |
|||
{ |
|||
m_replaceFootprints = aReplaceFootprints; |
|||
} |
|||
|
|||
bool GetReplaceFootprints() const { return m_replaceFootprints; } |
|||
|
|||
/** |
|||
* Function AnyFootprintsLinked |
|||
* @return true if any component with a footprint link is found. |
|||
*/ |
|||
bool AnyFootprintsLinked() const; |
|||
|
|||
/** |
|||
* Function AllFootprintsLinked |
|||
* @return true if all components have a footprint link. |
|||
*/ |
|||
bool AllFootprintsLinked() const; |
|||
|
|||
/** |
|||
* Function NoFootprintsLinked |
|||
* @return true if none of the components have a footprint link. |
|||
*/ |
|||
bool NoFootprintsLinked() const { return !AnyFootprintsLinked(); } |
|||
|
|||
/** |
|||
* Function AnyFootprintsChanged |
|||
* @return true if any components footprints were changed when the footprint link file |
|||
* (*.cmp) was loaded. |
|||
*/ |
|||
bool AnyFootprintsChanged() const; |
|||
|
|||
#if defined(DEBUG) |
|||
/** |
|||
* Function Show |
|||
* is used to output the object tree, currently for debugging only. |
|||
* @param aNestLevel An aid to prettier tree indenting, and is the level |
|||
* of nesting of this object within the overall tree. |
|||
* @param aReporter A reference to a #REPORTER object to output to. |
|||
*/ |
|||
virtual void Show( int aNestLevel, REPORTER& aReporter ); |
|||
#endif |
|||
}; |
|||
|
|||
|
|||
#endif // PCB_NETLIST_H |
Write
Preview
Loading…
Cancel
Save
Reference in new issue