KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sch_sheet_path.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
5 * Copyright (C) 2011 Wayne Stambaugh <[email protected]>
6 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 */
21
26
27#ifndef CLASS_DRAWSHEET_PATH_H
28#define CLASS_DRAWSHEET_PATH_H
29
30#include <map>
31#include <optional>
32#include <unordered_map>
33
34#include <kiid.h>
35#include <lib_id.h>
36#include <pin_map.h>
37#include <wx/string.h>
38
39class SCH_SYMBOL;
40class SCH_SHEET;
41class SCH_SHEET_LIST;
42
49
54{
55public:
56 VARIANT( const wxString& aName = wxEmptyString ) :
57 m_Name( aName ),
58 m_ExcludedFromSim( false ),
59 m_ExcludedFromBOM( false ),
60 m_ExcludedFromBoard( false ),
62 m_DNP( false )
63 {
64 }
65
66 virtual ~VARIANT() = default;
67
68 wxString m_Name;
69 wxString m_Description;
74 bool m_DNP;
75 std::map<wxString, wxString> m_Fields;
76};
77
78
88{
89public:
90 SCH_SYMBOL_VARIANT( const wxString& aName = wxEmptyString ) :
91 VARIANT( aName )
92 {}
93
94 void InitializeAttributes( const SCH_SYMBOL& aSymbol );
95
98 bool HasDifferentials( const SCH_SYMBOL& aSymbol ) const;
99
100 virtual ~SCH_SYMBOL_VARIANT() = default;
101
104
106 std::optional<LIB_ID> m_SymbolOverride;
107};
108
109
114{
116
117 // Things that can be annotated:
118 wxString m_Reference;
119 int m_Unit = 1;
120
121 // Do not use. This is left over from the dubious decision to instantiate symbol value
122 // and footprint fields. This is now handle by variants.
123 wxString m_Value;
124 wxString m_Footprint;
125
126 // The project name associated with this instance.
128
129 bool m_DNP = false;
130 bool m_ExcludedFromBOM = false;
131 bool m_ExcludedFromSim = false;
134
136 bool m_RefLacksSuffix = false;
137
139 std::map<wxString, SCH_SYMBOL_VARIANT> m_Variants;
140};
141
142
154{
155public:
156 SCH_SHEET_VARIANT( const wxString& aName = wxEmptyString ) :
157 VARIANT( aName )
158 {}
159
160 virtual ~SCH_SHEET_VARIANT() = default;
161
162 void InitializeAttributes( const SCH_SHEET& aSheet );
163
165 bool HasDifferentials( const SCH_SHEET& aSheet ) const;
166};
167
168
173{
175
176 wxString m_PageNumber;
177
178 // The project name associated with this instance.
180
181 bool m_DNP = false;
182 bool m_ExcludedFromBOM = false;
183 bool m_ExcludedFromSim = false;
186
188 std::map<wxString, SCH_SHEET_VARIANT> m_Variants;
189};
190
191
229
230
231class EDA_ITEM;
232class SCH_SHEET;
233class SCH_SCREEN;
234class SCH_MARKER;
235class SCH_ITEM;
236class SCH_SYMBOL;
238
239
243typedef std::map<wxString, SCH_REFERENCE_LIST> SCH_MULTI_UNIT_REFERENCE_MAP;
244
255{
256public:
258
259 SCH_SHEET_PATH( const SCH_SHEET_PATH& aOther );
260
261 SCH_SHEET_PATH& operator=( const SCH_SHEET_PATH& aOther );
262
263 // Move assignment operator
265
266 void Swap( SCH_SHEET_PATH& aOther ) noexcept;
267
268 SCH_SHEET_PATH operator+( const SCH_SHEET_PATH& aOther );
269
270 ~SCH_SHEET_PATH() = default;
271
273 SCH_SHEET* at( size_t aIndex ) const { return m_sheets.at( aIndex ); }
274
276 void clear()
277 {
278 m_sheets.clear();
279 Rehash();
280 }
281
283 bool empty() const { return m_sheets.empty(); }
284
286 void pop_back()
287 {
288 m_sheets.pop_back();
289 Rehash();
290 }
291
293 void push_back( SCH_SHEET* aSheet );
294
296 size_t size() const { return m_sheets.size(); }
297
298 std::vector<SCH_SHEET*>::iterator erase( std::vector<SCH_SHEET*>::const_iterator aPosition )
299 {
300 std::vector<SCH_SHEET*>::iterator ret = m_sheets.erase( aPosition );
301
302 // Rehash to keep m_current_hash and the cached path consistent with the shortened list.
303 Rehash();
304
305 return ret;
306 }
307
308 void Rehash();
309
310 size_t GetCurrentHash() const { return m_current_hash; }
311
321 void SetVirtualPageNumber( int aPageNumber ) { m_virtualPageNumber = aPageNumber; }
322
324
330 void SetPageNumber( const wxString& aPageNumber );
331
332 wxString GetPageNumber() const;
333
334 int GetPageNumberAsInt() const;
335
336 const SCH_SHEET* GetSheet( unsigned aIndex ) const
337 {
338 SCH_SHEET* retv = nullptr;
339
340 if( aIndex < size() )
341 retv = at( aIndex );
342
343 return retv;
344 }
345
354 int Cmp( const SCH_SHEET_PATH& aSheetPathToTest ) const;
355
357 const wxString& GetCachedPageNumber() const { return m_cached_page_number; }
358
367 int ComparePageNum( const SCH_SHEET_PATH& aSheetPathToTest ) const;
368
375 bool IsContainedWithin( const SCH_SHEET_PATH& aSheetPathToTest ) const;
376
382 SCH_SHEET* Last() const;
383
388
390 SCH_SCREEN* LastScreen() const;
391
392 bool GetExcludedFromSim() const;
393 bool GetExcludedFromSim( const wxString& aVariantName ) const;
394 bool GetExcludedFromBOM() const;
395 bool GetExcludedFromBOM( const wxString& aVariantName ) const;
396 bool GetExcludedFromBoard() const;
397 bool GetExcludedFromBoard( const wxString& aVariantName ) const;
398 bool GetDNP() const;
399 bool GetDNP( const wxString& aVariantName ) const;
400
404 SCH_ITEM* ResolveItem( const KIID& aID ) const;
405
411 wxString PathAsString() const;
412
422 KIID_PATH Path() const;
423
425 const KIID_PATH& PathRef() const { return m_path; }
426
442 wxString PathHumanReadable( bool aUseShortRootName = true,
443 bool aStripTrailingSeparator = false,
444 bool aEscapeSheetNames = false ) const;
445
452 wxString ComposeRefSuffix() const;
453
460 void UpdateAllScreenReferences() const;
461
472 void AppendSymbol( SCH_REFERENCE_LIST& aReferences, SCH_SYMBOL* aSymbol,
473 SYMBOL_FILTER aSymbolFilter, bool aForceIncludeOrphanSymbols = false ) const;
474
484 void GetSymbols( SCH_REFERENCE_LIST& aReferences, SYMBOL_FILTER aSymbolFilter,
485 bool aForceIncludeOrphanSymbols = false ) const;
486
498 SYMBOL_FILTER aSymbolFilter ) const;
499
510 SYMBOL_FILTER aSymbolFilter ) const;
511
521 bool TestForRecursion( const wxString& aSrcFileName, const wxString& aDestFileName );
522
540
560 void AddNewSymbolInstances( const SCH_SHEET_PATH& aPrefixSheetPath, const wxString& aProjectName,
561 const SCH_SHEET_LIST* aSourceSheets = nullptr );
562
563 void RemoveSymbolInstances( const SCH_SHEET_PATH& aPrefixSheetPath );
564
565 void CheckForMissingSymbolInstances( const wxString& aProjectName );
566
578 bool IsSharedPath() const;
579
580 bool operator==( const SCH_SHEET_PATH& d1 ) const;
581
582 bool operator!=( const SCH_SHEET_PATH& d1 ) const { return !( *this == d1 ) ; }
583
584 bool operator<( const SCH_SHEET_PATH& d1 ) const { return m_sheets < d1.m_sheets; }
585
586private:
587 void initFromOther( const SCH_SHEET_PATH& aOther );
588
589protected:
590 std::vector<SCH_SHEET*> m_sheets;
591
593 mutable wxString m_cached_page_number;
594
597
599
600 std::map<std::pair<wxString, wxString>, bool> m_recursion_test_cache;
601};
602
603
604namespace std
605{
606 template<> struct hash<SCH_SHEET_PATH>
607 {
608 size_t operator()( const SCH_SHEET_PATH& path ) const;
609 };
610}
611
613{
614 size_t operator()( const SCH_SHEET_PATH& path ) const
615 {
616 return path.GetCurrentHash();
617 }
618};
619
621{
622 bool operator()( const SCH_SHEET_PATH& lhs, const SCH_SHEET_PATH& rhs ) const
623 {
624 return lhs.GetCurrentHash() < rhs.GetCurrentHash();
625 }
626};
627
628
637class SCH_SHEET_LIST : public std::vector<SCH_SHEET_PATH>
638{
639public:
645 SCH_SHEET_LIST( SCH_SHEET* aSheet = nullptr );
646
648
654 bool IsModified() const;
655
656 void ClearModifyStatus();
657
663 SCH_ITEM* ResolveItem( const KIID& aID, SCH_SHEET_PATH* aPathOut = nullptr,
664 bool aAllowNullptrReturn = false ) const;
665
669 void FillItemMap( std::unordered_map<KIID, EDA_ITEM*>& aMap ) const;
670
680 void GetSymbols( SCH_REFERENCE_LIST& aReferences, SYMBOL_FILTER aSymbolFilter,
681 bool aForceIncludeOrphanSymbols = false ) const;
682
694 void GetSymbolsWithinPath( SCH_REFERENCE_LIST& aReferences, const SCH_SHEET_PATH& aSheetPath,
695 SYMBOL_FILTER aSymbolFilter,
696 bool aForceIncludeOrphanSymbols = false ) const;
697
705 void GetSheetsWithinPath( std::vector<SCH_SHEET_PATH>& aSheets,
706 const SCH_SHEET_PATH& aSheetPath ) const;
707
708
715 std::optional<SCH_SHEET_PATH> GetSheetPathByKIIDPath( const KIID_PATH& aPath,
716 bool aIncludeLastSheet = true ) const;
717
718
728 SYMBOL_FILTER aSymbolFilter ) const;
729
738 bool TestForRecursion( const SCH_SHEET_LIST& aSrcSheetHierarchy,
739 const wxString& aDestFileName );
740
746
752
756 SCH_SHEET_LIST FindAllSheetsForScreen( const SCH_SCREEN* aScreen ) const;
757
774 void BuildSheetList( SCH_SHEET* aSheet, bool aCheckIntegrity );
775
785 void SortByPageNumbers( bool aUpdateVirtualPageNums = true );
786
792 void SortByHierarchicalPageNumbers( bool aUpdateVirtualPageNums = true );
793
794 bool NameExists( const wxString& aSheetName ) const;
795
796 bool PageNumberExists( const wxString& aPageNumber ) const;
797
803 void TrimToPageNumbers( const std::vector<wxString>& aPageInclusions );
804
808 wxString GetNextPageNumber() const;
809
817 void UpdateSymbolInstanceData( const std::vector<SCH_SYMBOL_INSTANCE>& aSymbolInstances );
818
826 void UpdateSheetInstanceData( const std::vector<SCH_SHEET_INSTANCE>& aSheetInstances );
827
828 std::vector<KIID_PATH> GetPaths() const;
829
835 std::vector<SCH_SHEET_INSTANCE> GetSheetInstances() const;
836
845 bool AllSheetPageNumbersEmpty() const;
846
854
865 bool RepairPageNumbers();
866
875 void AddNewSymbolInstances( const SCH_SHEET_PATH& aPrefixSheetPath, const wxString& aProjectName,
876 bool aStripRefSuffixes = false );
877
884 wxString SourceRefSuffix( const SCH_SYMBOL& aSymbol, const KIID_PATH& aInstancePath ) const;
885
886 void AddNewSheetInstances( const SCH_SHEET_PATH& aPrefixSheetPath,
887 int aLastVirtualPageNumber );
888
889 int GetLastVirtualPageNumber() const;
890
891 void RemoveSymbolInstances( const SCH_SHEET_PATH& aPrefixSheetPath );
892
893 void CheckForMissingSymbolInstances( const wxString& aProjectName );
894
902 void StripRefSuffixes();
903
910 void RecoverPackageRefs();
911
917 int ShareReusedSheetRef( SCH_SYMBOL* aSymbol, const SCH_SHEET_PATH& aSource ) const;
918
919 bool HasPath( const KIID_PATH& aPath ) const;
920
921 bool ContainsSheet( const SCH_SHEET* aSheet ) const;
922
932 std::optional<SCH_SHEET_PATH> GetOrdinalPath( const SCH_SCREEN* aScreen ) const;
933
934private:
936};
937
938#endif // CLASS_DRAWSHEET_PATH_H
A base class for most all the KiCad significant classes used in schematics and boards.
Definition eda_item.h:98
Definition kiid.h:46
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition sch_item.h:170
Container to create a flattened list of symbols because in a complex hierarchy, a symbol can be used ...
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
std::optional< SCH_SHEET_PATH > GetSheetPathByKIIDPath(const KIID_PATH &aPath, bool aIncludeLastSheet=true) const
Finds a SCH_SHEET_PATH that matches the provided KIID_PATH.
SCH_ITEM * ResolveItem(const KIID &aID, SCH_SHEET_PATH *aPathOut=nullptr, bool aAllowNullptrReturn=false) const
Fetch a SCH_ITEM by ID.
std::optional< SCH_SHEET_PATH > GetOrdinalPath(const SCH_SCREEN *aScreen) const
Return the ordinal sheet path of aScreen.
SCH_SHEET_PATH m_currentSheetPath
void TrimToPageNumbers(const std::vector< wxString > &aPageInclusions)
Truncates the list by removing sheet's with page numbers not in the given list.
void SortByPageNumbers(bool aUpdateVirtualPageNums=true)
Sort the list of sheets by page number.
bool NameExists(const wxString &aSheetName) const
void GetSymbolsWithinPath(SCH_REFERENCE_LIST &aReferences, const SCH_SHEET_PATH &aSheetPath, SYMBOL_FILTER aSymbolFilter, bool aForceIncludeOrphanSymbols=false) const
Add a SCH_REFERENCE object to aReferences for each symbol in the list of sheets that are contained wi...
std::vector< SCH_SHEET_INSTANCE > GetSheetInstances() const
Fetch the instance information for all of the sheets in the hierarchy.
void UpdateSheetInstanceData(const std::vector< SCH_SHEET_INSTANCE > &aSheetInstances)
Update all of the sheet instance information using aSheetInstances.
void StripRefSuffixes()
Recover the base references from the composed references a file stores.
void SetInitialPageNumbers()
Set initial sheet page numbers.
void RemoveSymbolInstances(const SCH_SHEET_PATH &aPrefixSheetPath)
SCH_SHEET_LIST FindAllSheetsForScreen(const SCH_SCREEN *aScreen) const
Return a SCH_SHEET_LIST with a copy of all the SCH_SHEET_PATH using a particular screen.
wxString GetNextPageNumber() const
bool AllSheetPageNumbersEmpty() const
Check all of the sheet instance for empty page numbers.
bool IsModified() const
Check the entire hierarchy for any modifications.
SCH_SHEET_LIST(SCH_SHEET *aSheet=nullptr)
Construct a flattened list of SCH_SHEET_PATH objects from aSheet.
int GetLastVirtualPageNumber() const
void UpdateSymbolInstanceData(const std::vector< SCH_SYMBOL_INSTANCE > &aSymbolInstances)
Update all of the symbol instance information using aSymbolInstances.
void GetSheetsWithinPath(std::vector< SCH_SHEET_PATH > &aSheets, const SCH_SHEET_PATH &aSheetPath) const
Add a SCH_SHEET_PATH object to aSheets for each sheet in the list that are contained within aSheetPat...
void FillItemMap(std::unordered_map< KIID, EDA_ITEM * > &aMap) const
Fill an item cache for temporary use when many items need to be fetched.
bool PageNumberExists(const wxString &aPageNumber) const
void SortByHierarchicalPageNumbers(bool aUpdateVirtualPageNums=true)
This works like SortByPageNumbers, but it sorts the sheets first by their hierarchical depth and then...
void AddNewSheetInstances(const SCH_SHEET_PATH &aPrefixSheetPath, int aLastVirtualPageNumber)
void GetMultiUnitSymbols(SCH_MULTI_UNIT_REFERENCE_MAP &aRefList, SYMBOL_FILTER aSymbolFilter) const
Add a SCH_REFERENCE_LIST object to aRefList for each same-reference set of multi-unit parts in the li...
void RecoverPackageRefs()
Give a unit loaded by StripRefSuffixes() the base of a package in another top level sheet.
bool ContainsSheet(const SCH_SHEET *aSheet) const
void AddNewSymbolInstances(const SCH_SHEET_PATH &aPrefixSheetPath, const wxString &aProjectName, bool aStripRefSuffixes=false)
Attempt to add new symbol instances for all symbols in this list of sheet paths prefixed with aPrefix...
bool RepairPageNumbers()
Assign valid page numbers to sheet paths whose stored page number is missing or collides with an earl...
std::vector< KIID_PATH > GetPaths() const
int ShareReusedSheetRef(SCH_SYMBOL *aSymbol, const SCH_SHEET_PATH &aSource) const
Give every other instance of aSymbol's sheet the base reference and unit it has on aSource.
void BuildSheetList(SCH_SHEET *aSheet, bool aCheckIntegrity)
Build the list of sheets and their sheet path from aSheet.
SCH_SHEET_PATH FindSheetForScreen(const SCH_SCREEN *aScreen)
Return the first SCH_SHEET_PATH object (not necessarily the only one) using a particular screen.
void CheckForMissingSymbolInstances(const wxString &aProjectName)
wxString SourceRefSuffix(const SCH_SYMBOL &aSymbol, const KIID_PATH &aInstancePath) const
Return the suffix the source project composed into the instance of aSymbol at aInstancePath,...
bool HasPath(const KIID_PATH &aPath) const
SCH_SHEET_PATH * FindSheetForPath(const SCH_SHEET_PATH *aPath)
Return a pointer to the first SCH_SHEET_PATH object (not necessarily the only one) matching the provi...
void GetSymbols(SCH_REFERENCE_LIST &aReferences, SYMBOL_FILTER aSymbolFilter, bool aForceIncludeOrphanSymbols=false) const
Add a SCH_REFERENCE object to aReferences for each symbol in the list of sheets.
bool TestForRecursion(const SCH_SHEET_LIST &aSrcSheetHierarchy, const wxString &aDestFileName)
Test every SCH_SHEET_PATH in this SCH_SHEET_LIST to verify if adding the sheets stored in aSrcSheetHi...
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
void AppendSymbol(SCH_REFERENCE_LIST &aReferences, SCH_SYMBOL *aSymbol, SYMBOL_FILTER aSymbolFilter, bool aForceIncludeOrphanSymbols=false) const
Append a SCH_REFERENCE object to aReferences based on aSymbol.
bool IsSharedPath() const
Determine if this sheet path is shared in a complex hierarchy.
KIID_PATH m_path
The UUID path of m_sheets, kept in step with it by Rehash().
bool GetExcludedFromBOM() const
bool operator!=(const SCH_SHEET_PATH &d1) const
void Swap(SCH_SHEET_PATH &aOther) noexcept
const SCH_SHEET * GetSheet(unsigned aIndex) const
bool empty() const
Forwarded method from std::vector.
int ComparePageNum(const SCH_SHEET_PATH &aSheetPathToTest) const
Compare sheets by their page number.
size_t GetCurrentHash() const
void GetMultiUnitSymbols(SCH_MULTI_UNIT_REFERENCE_MAP &aRefList, SYMBOL_FILTER aSymbolFilter) const
Add a SCH_REFERENCE_LIST object to aRefList for each same-reference set of multi-unit parts in the sh...
void GetSymbols(SCH_REFERENCE_LIST &aReferences, SYMBOL_FILTER aSymbolFilter, bool aForceIncludeOrphanSymbols=false) const
Adds SCH_REFERENCE object to aReferences for each symbol in the sheet.
std::vector< SCH_SHEET * >::iterator erase(std::vector< SCH_SHEET * >::const_iterator aPosition)
bool operator==(const SCH_SHEET_PATH &d1) const
KIID_PATH Path() const
Get the sheet path as an KIID_PATH.
bool TestForRecursion(const wxString &aSrcFileName, const wxString &aDestFileName)
Test the SCH_SHEET_PATH file names to check adding the sheet stored in the file aSrcFileName to the s...
void UpdateAllScreenReferences() const
Update all the symbol references for this sheet path.
bool operator<(const SCH_SHEET_PATH &d1) const
void MakeFilePathRelativeToParentSheet()
Make the sheet file name relative to its parent sheet.
SCH_ITEM * ResolveItem(const KIID &aID) const
Fetch a SCH_ITEM by ID.
std::vector< SCH_SHEET * > m_sheets
SCH_SCREEN * LastScreen()
void AddNewSymbolInstances(const SCH_SHEET_PATH &aPrefixSheetPath, const wxString &aProjectName, const SCH_SHEET_LIST *aSourceSheets=nullptr)
Attempt to add new symbol instances for all symbols in this sheet path prefixed with aPrefixSheetPath...
int Cmp(const SCH_SHEET_PATH &aSheetPathToTest) const
Compare if this is the same sheet path as aSheetPathToTest.
void initFromOther(const SCH_SHEET_PATH &aOther)
wxString m_cached_page_number
wxString GetPageNumber() const
void RemoveSymbolInstances(const SCH_SHEET_PATH &aPrefixSheetPath)
void CheckForMissingSymbolInstances(const wxString &aProjectName)
bool IsContainedWithin(const SCH_SHEET_PATH &aSheetPathToTest) const
Check if this path is contained inside aSheetPathToTest.
~SCH_SHEET_PATH()=default
void CachePageNumber() const
SCH_SHEET * at(size_t aIndex) const
Forwarded method from std::vector.
const wxString & GetCachedPageNumber() const
void SetVirtualPageNumber(int aPageNumber)
Set the sheet instance virtual page number.
wxString PathHumanReadable(bool aUseShortRootName=true, bool aStripTrailingSeparator=false, bool aEscapeSheetNames=false) const
Return the sheet path in a human readable form made from the sheet names.
std::map< std::pair< wxString, wxString >, bool > m_recursion_test_cache
bool GetExcludedFromSim() const
wxString PathAsString() const
Return the path of time stamps which do not changes even when editing sheet parameters.
void AppendMultiUnitSymbol(SCH_MULTI_UNIT_REFERENCE_MAP &aRefList, SCH_SYMBOL *aSymbol, SYMBOL_FILTER aSymbolFilter) const
Append a SCH_REFERENCE_LIST object to aRefList based on aSymbol, storing same-reference set of multi-...
bool GetExcludedFromBoard() const
void SetPageNumber(const wxString &aPageNumber)
Set the sheet instance user definable page number.
SCH_SHEET_PATH & operator=(const SCH_SHEET_PATH &aOther)
int GetPageNumberAsInt() const
bool GetDNP() const
SCH_SHEET * Last() const
Return a pointer to the last SCH_SHEET of the list.
SCH_SHEET_PATH operator+(const SCH_SHEET_PATH &aOther)
const KIID_PATH & PathRef() const
Borrow the cached path until this sheet path is modified or destroyed.
int m_virtualPageNumber
Page numbers are maintained by the sheet load order.
void push_back(SCH_SHEET *aSheet)
Forwarded method from std::vector.
void clear()
Forwarded method from std::vector.
size_t size() const
Forwarded method from std::vector.
wxString ComposeRefSuffix() const
Compose the reference suffixes of every sheet in this path, from the root down.
int GetVirtualPageNumber() const
void pop_back()
Forwarded method from std::vector.
void InitializeAttributes(const SCH_SHEET &aSheet)
SCH_SHEET_VARIANT(const wxString &aName=wxEmptyString)
virtual ~SCH_SHEET_VARIANT()=default
bool HasDifferentials(const SCH_SHEET &aSheet) const
Return true if the variant carries any differential against the base sheet values.
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition sch_sheet.h:50
PIN_MAP_INSTANCE_OVERRIDE m_PinMapOverride
Per-instance pin-to-pad map override for this variant (issue #2282).
virtual ~SCH_SYMBOL_VARIANT()=default
std::optional< LIB_ID > m_SymbolOverride
Alternate library symbol to substitute for the base symbol in this variant, if any.
void InitializeAttributes(const SCH_SYMBOL &aSymbol)
bool HasDifferentials(const SCH_SYMBOL &aSymbol) const
Return true if the variant carries any differential against the base symbol values,...
SCH_SYMBOL_VARIANT(const wxString &aName=wxEmptyString)
Schematic symbol object.
Definition sch_symbol.h:76
wxString m_Name
virtual ~VARIANT()=default
bool m_ExcludedFromBOM
std::map< wxString, wxString > m_Fields
bool m_ExcludedFromPosFiles
bool m_ExcludedFromSim
bool m_ExcludedFromBoard
wxString m_Description
VARIANT(const wxString &aName=wxEmptyString)
STL namespace.
std::map< wxString, SCH_REFERENCE_LIST > SCH_MULTI_UNIT_REFERENCE_MAP
Container to map reference designators for multi-unit parts.
SYMBOL_FILTER
@ SYMBOL_FILTER_NON_POWER
@ SYMBOL_FILTER_ALL
@ SYMBOL_FILTER_POWER
Per-instance override of the active pin map and a sparse delta on top.
Definition pin_map.h:200
A simple container for sheet instance information.
std::map< wxString, SCH_SHEET_VARIANT > m_Variants
A list of sheet variants.
A simple container for schematic symbol instance information.
std::map< wxString, SCH_SYMBOL_VARIANT > m_Variants
A list of symbol variants.
bool m_RefLacksSuffix
Set at load when the saved reference lacked its sheet suffix, cleared when the reference changes.
bool operator()(const SCH_SHEET_PATH &lhs, const SCH_SHEET_PATH &rhs) const
size_t operator()(const SCH_SHEET_PATH &path) const
size_t operator()(const SCH_SHEET_PATH &path) const
std::string path