52 void SetDefaultNetclass( std::shared_ptr<NETCLASS> netclass );
55 std::shared_ptr<NETCLASS> GetDefaultNetclass();
58 bool HasNetclass(
const wxString& netclassName )
const;
62 void SetNetclass(
const wxString& netclassName, std::shared_ptr<NETCLASS>& netclass );
66 void SetNetclasses(
const std::map<wxString, std::shared_ptr<NETCLASS>>& netclasses );
69 const std::map<wxString, std::shared_ptr<NETCLASS>>& GetNetclasses()
const;
74 const std::map<wxString, std::shared_ptr<NETCLASS>>& GetCompositeNetclasses()
const;
78 void ClearNetclasses();
81 const std::map<wxString, std::set<wxString>>& GetNetclassLabelAssignments()
const;
85 void ClearNetclassLabelAssignments();
89 void ClearNetclassLabelAssignment(
const wxString& netName );
93 void SetNetclassLabelAssignment(
const wxString& netName,
94 const std::set<wxString>& netclasses );
98 void AppendNetclassLabelAssignment(
const wxString& netName,
99 const std::set<wxString>& netclasses );
102 bool HasNetclassLabelAssignment(
const wxString& netName )
const;
106 void SetNetclassPatternAssignment(
const wxString& pattern,
const wxString& netclass );
110 void SetNetclassPatternAssignments(
111 std::vector<std::pair<std::unique_ptr<EDA_COMBINED_MATCHER>, wxString>>&&
115 std::vector<std::pair<std::unique_ptr<EDA_COMBINED_MATCHER>, wxString>>&
116 GetNetclassPatternAssignments();
119 void ClearNetclassPatternAssignments();
122 void ClearCacheForNet(
const wxString& netName );
125 void ClearAllCaches();
129 void SetNetColorAssignment(
const wxString& netName,
const KIGFX::COLOR4D& color );
132 const std::map<wxString, KIGFX::COLOR4D>& GetNetColorAssignments()
const;
136 void ClearNetColorAssignments();
139 bool HasEffectiveNetClass(
const wxString& aNetName )
const;
143 std::shared_ptr<NETCLASS> GetCachedEffectiveNetClass(
const wxString& aNetName )
const;
147 std::shared_ptr<NETCLASS> GetEffectiveNetClass(
const wxString& aNetName );
152 void RecomputeEffectiveNetclasses();
160 std::shared_ptr<NETCLASS> GetNetClassByName(
const wxString& aNetName )
const;
172 static bool ParseBusVector(
const wxString& aBus, wxString* aName,
173 std::vector<wxString>* aMemberList );
183 static bool ParseBusGroup(
const wxString& aGroup, wxString*
name,
184 std::vector<wxString>* aMemberList );
198 static void ForEachBusMember(
const wxString& aBusPattern,
199 const std::function<
void(
const wxString& )>& aFunction );
202 bool migrateSchema0to1();
203 bool migrateSchema1to2();
204 bool migrateSchema2to3();
205 bool migrateSchema3to4();
206 bool migrateSchema4to5();
217 void makeEffectiveNetclass( std::shared_ptr<NETCLASS>& effectiveNetclass,
218 std::vector<NETCLASS*>& netclasses )
const;
222 bool addMissingDefaults(
NETCLASS* nc )
const;
225 void addSinglePatternAssignment(
const wxString& pattern,
const wxString& netclass );
237 std::vector<std::pair<std::unique_ptr<EDA_COMBINED_MATCHER>, wxString>>