|
KiCad PCB EDA Suite
|
Main-thread publication. More...
#include <conn_publish.h>
Classes | |
| struct | ROW_INPUT |
| Shared row of one island record. More... | |
| struct | ROW_UPDATE |
Public Types | |
| using | COMPONENTS = std::map<NODE_ID, PUBLISHED_COMPONENT> |
| using | NAME_INDEX = std::map<NAME_ID, NODE_ID, NAME_LESS> |
| using | SLOT_INDEX = std::map<SLOT_KEY, NODE_ID, KEY_LESS> |
| using | COMPONENT_LINKS = std::map<NODE_ID, std::vector<NODE_ID>> |
| using | ROWS = std::map<ITEM_KEY, ITEM_RESULT, KEY_LESS> |
| using | CLASS_ASSIGNMENTS = std::map<NAME_ID, std::shared_ptr<const std::vector<NAME_ID>>, NAME_LESS> |
Public Member Functions | |
| PUBLICATION (SESSION_KEYS &aKeys) | |
| void | Update (const COMPONENT_CACHE< BUNDLE_BINDING > &aBundles, const COMPONENT_CACHE< SIGNAL_RESULT > &aSignals, const RECORD_STORE::RECORD_CACHE &aRecords, std::span< const FRAME_INSTANCE > aFrame, const INPUT_STORE &aInputs) |
| void | Clear () |
| const COMPONENTS & | Components () const |
| const CHANGE_SET & | Changes () const |
| const NAME_INDEX & | ByName () const |
| const SLOT_INDEX & | SlotComponents () const |
| std::optional< NODE_ID > | FindByName (const wxString &aName) const |
| std::vector< wxString > | EquivalentBusNames (const wxString &aName) const |
| std::span< const NODE_ID > | MembersOf (NODE_ID aBundle) const |
| std::span< const NODE_ID > | ParentsOf (NODE_ID aSignal) const |
| const AUXILIARY & | Auxiliary () const |
| const ROWS & | Rows () const |
| const CLASS_ASSIGNMENTS & | Netclasses () const |
Private Types | |
| using | BUS_SIGNATURE = std::pair<NAME_ID, std::vector<NAME_ID>> |
| using | EQUIVALENT_BUSES = std::map<BUS_SIGNATURE, std::set<NODE_ID>> |
| using | BUS_SIGNATURES = std::map<NODE_ID, EQUIVALENT_BUSES::iterator> |
| using | SLOT_INPUTS = std::map<SLOT_KEY, const SLOT_INPUT*, KEY_LESS> |
| using | ROW_INPUTS = std::map<RECORD_KEY, std::shared_ptr<const ROW_INPUT>, KEY_LESS> |
Private Member Functions | |
| ROW_UPDATE | PrepareRows (const COMPONENTS &aCurrent, const RECORD_STORE::RECORD_CACHE &aRecords, const SLOT_INPUTS &aSlots, CHANGE_SET &aChanges) |
| void | ApplyRows (ROW_UPDATE &&aUpdate) |
| void | UpdateIndexes (const COMPONENTS &aCurrent, const SLOT_INPUTS &aSlots) |
| void | UpdateBusSignatures (const COMPONENTS &aCurrent, const SLOT_INPUTS &aSlots) |
Private Attributes | |
| SESSION_KEYS & | m_keys |
| AUXILIARY | m_auxiliary |
| ROWS | m_rows |
| ROW_INPUTS | m_rowInputs |
| CLASS_ASSIGNMENTS | m_netclasses |
| NAME_INDEX | m_byName |
| SLOT_INDEX | m_slotComponents |
| COMPONENT_LINKS | m_busMembers |
| COMPONENT_LINKS | m_busParents |
| BUS_SIGNATURES | m_busSignatures |
| EQUIVALENT_BUSES | m_equivalentBuses |
| COMPONENTS | m_components |
| std::map< NODE_ID, uint64_t > | m_versions |
| CHANGE_SET | m_changes |
| int | m_nextNetCode = 1 |
| Never reset, so codes do not repeat. | |
| uint32_t | m_nextSubgraphCode = 1 |
| Never reset, so codes do not repeat. | |
Main-thread publication.
Previous memberships provide suffix, code and succession continuity. Net and subgraph codes never repeat during the life of the publication, also across Clear().
Definition at line 113 of file conn_publish.h.
|
private |
Definition at line 149 of file conn_publish.h.
|
private |
Definition at line 151 of file conn_publish.h.
| using SCH_CONNECTIVITY::PUBLICATION::CLASS_ASSIGNMENTS = std::map<NAME_ID, std::shared_ptr<const std::vector<NAME_ID>>, NAME_LESS> |
Definition at line 123 of file conn_publish.h.
| using SCH_CONNECTIVITY::PUBLICATION::COMPONENT_LINKS = std::map<NODE_ID, std::vector<NODE_ID>> |
Definition at line 120 of file conn_publish.h.
| using SCH_CONNECTIVITY::PUBLICATION::COMPONENTS = std::map<NODE_ID, PUBLISHED_COMPONENT> |
Definition at line 116 of file conn_publish.h.
|
private |
Definition at line 150 of file conn_publish.h.
| using SCH_CONNECTIVITY::PUBLICATION::NAME_INDEX = std::map<NAME_ID, NODE_ID, NAME_LESS> |
Definition at line 118 of file conn_publish.h.
|
private |
Definition at line 164 of file conn_publish.h.
| using SCH_CONNECTIVITY::PUBLICATION::ROWS = std::map<ITEM_KEY, ITEM_RESULT, KEY_LESS> |
Definition at line 122 of file conn_publish.h.
| using SCH_CONNECTIVITY::PUBLICATION::SLOT_INDEX = std::map<SLOT_KEY, NODE_ID, KEY_LESS> |
Definition at line 119 of file conn_publish.h.
|
private |
Definition at line 152 of file conn_publish.h.
|
explicit |
Definition at line 51 of file conn_rows.cpp.
References m_auxiliary, m_byName, m_keys, m_netclasses, m_rowInputs, m_rows, and m_slotComponents.
|
private |
Definition at line 344 of file conn_rows.cpp.
References m_netclasses, m_rowInputs, and m_rows.
Referenced by Update().
|
inline |
Definition at line 143 of file conn_publish.h.
References m_auxiliary.
Referenced by SCH_CONNECTIVITY::FACADE::Recalculate().
|
inline |
Definition at line 134 of file conn_publish.h.
References m_byName.
|
inline |
Definition at line 132 of file conn_publish.h.
References m_changes.
Referenced by BOOST_AUTO_TEST_CASE(), SCH_CONNECTIVITY::FACADE::Recalculate(), and SCH_EDIT_FRAME::RefreshConnectivity().
| void SCH_CONNECTIVITY::PUBLICATION::Clear | ( | ) |
Definition at line 713 of file conn_publish.cpp.
References m_auxiliary, m_busMembers, m_busParents, m_busSignatures, m_byName, m_changes, m_components, m_equivalentBuses, m_netclasses, m_rowInputs, m_rows, m_slotComponents, and m_versions.
|
inline |
Definition at line 131 of file conn_publish.h.
References m_components.
| std::vector< wxString > SCH_CONNECTIVITY::PUBLICATION::EquivalentBusNames | ( | const wxString & | aName | ) | const |
Definition at line 49 of file conn_indexes.cpp.
References FindByName(), m_busSignatures, m_components, m_keys, name, and result.
Referenced by SCH_CONNECTIVITY::FACADE::GetEquivalentBusNames().
| std::optional< NODE_ID > SCH_CONNECTIVITY::PUBLICATION::FindByName | ( | const wxString & | aName | ) | const |
Definition at line 26 of file conn_indexes.cpp.
References m_byName, m_keys, and name.
Referenced by EquivalentBusNames(), SCH_CONNECTIVITY::FACADE::GetEquivalentBusNames(), and SCH_CONNECTIVITY::FACADE::NetByName().
Definition at line 37 of file conn_indexes.cpp.
References m_busMembers.
Referenced by SCH_CONNECTIVITY::FACADE::BusWithMembers(), and Update().
|
inline |
Definition at line 146 of file conn_publish.h.
References m_netclasses.
Definition at line 43 of file conn_indexes.cpp.
References m_busParents.
Referenced by SCH_CONNECTIVITY::FACADE::BundlesOf(), and UpdateIndexes().
|
private |
Definition at line 62 of file conn_rows.cpp.
References SCH_CONNECTIVITY::ApplyNameSuffix(), SCH_CONNECTIVITY::NETCLASS_DELTA::assigned, SCH_CONNECTIVITY::BUNDLE, BUS, BUS_GROUP, SCH_CONNECTIVITY::ITEM_RESULT::busSource, SCH_CONNECTIVITY::CHANGE_SET::changedItems, SCH_CONNECTIVITY::ITEM_RESULT::component, SCH_CONNECTIVITY::PUBLICATION::ROW_INPUT::connection, SCH_CONNECTIVITY::PUBLISHED_COMPONENT::content, SCH_CONNECTIVITY::ITEM_RESULT::driver, SCH_CONNECTIVITY::PUBLICATION::ROW_INPUT::driver, SCH_CONNECTIVITY::CHANGE_SET::driverChangedItems, SCH_CONNECTIVITY::CACHE_TABLE< KEY, VALUE, LESS >::Find(), SCH_CONNECTIVITY::ITEM_RESULT::fullLocalName, index, SCH_CONNECTIVITY::NAME_KEY::inst, SCH_CONNECTIVITY::RECORD_KEY::inst, SCH_CONNECTIVITY::INVALID_ID, SCH_CONNECTIVITY::ITEM_KEY::item, SCH_CONNECTIVITY::PUBLICATION::ROW_INPUT::items, SCH_CONNECTIVITY::ITEM_RESULT::itemType, SCH_CONNECTIVITY::ITEM_RESULT::kind, SCH_CONNECTIVITY::ITEM_RESULT::localName, m_components, m_keys, m_netclasses, m_rowInputs, m_rows, name, SCH_CONNECTIVITY::CLAIM::name, SCH_CONNECTIVITY::ITEM_RESULT::name, NET, SCH_CONNECTIVITY::CHANGE_SET::netclasses, SCH_CONNECTIVITY::ITEM_RESULT::netclasses, SCH_CONNECTIVITY::ITEM_RESULT::netCode, NONE, SCH_CONNECTIVITY::PIN, SCH_CONNECTIVITY::NETCLASS_DELTA::removed, result, SCH_CONNECTIVITY::CLAIM::schema, SCH_CONNECTIVITY::NAME_KEY::scope, SCH_CONNECTIVITY::SIGNAL, SCH_CONNECTIVITY::CLAIM::source, SCH_CONNECTIVITY::ITEM_RESULT::subgraphCode, SCH_CONNECTIVITY::NAME_KEY::text, and SCH_CONNECTIVITY::BUS_SCHEMA::VECTOR.
Referenced by Update().
|
inline |
Definition at line 145 of file conn_publish.h.
References m_rows.
Referenced by BOOST_AUTO_TEST_CASE().
|
inline |
Definition at line 135 of file conn_publish.h.
References m_slotComponents.
| void SCH_CONNECTIVITY::PUBLICATION::Update | ( | const COMPONENT_CACHE< BUNDLE_BINDING > & | aBundles, |
| const COMPONENT_CACHE< SIGNAL_RESULT > & | aSignals, | ||
| const RECORD_STORE::RECORD_CACHE & | aRecords, | ||
| std::span< const FRAME_INSTANCE > | aFrame, | ||
| const INPUT_STORE & | aInputs ) |
Definition at line 438 of file conn_publish.cpp.
References ApplyRows(), SCH_CONNECTIVITY::BUNDLE, SCH_CONNECTIVITY::CHANGE_SET::changedItems, SCH_CONNECTIVITY::SLOT_INPUT::claim, SCH_CONNECTIVITY::COMPONENT_CACHE< VALUE >::Entries(), equivalent(), SCH_CONNECTIVITY::CLAIM::fullName, SCH_CONNECTIVITY::BUS_SCHEMA::GROUP, SCH_CONNECTIVITY::INVALID_ID, SCH_CONNECTIVITY::SLOT_INPUT::key, SCH_CONNECTIVITY::SLOT_INPUT::localName, m_auxiliary, m_busSignatures, m_byName, m_changes, m_components, m_keys, m_nextNetCode, m_nextSubgraphCode, m_rows, m_versions, MembersOf(), name, SCH_CONNECTIVITY::CHANGE_SET::netsChanged, SCH_CONNECTIVITY::SLOT_INPUT::parentBundle, SCH_CONNECTIVITY::CLAIM::path, PrepareRows(), SCH_CONNECTIVITY::CLAIM::schema, SCH_CONNECTIVITY::SIGNAL, SCH_CONNECTIVITY::CLAIM::source, UpdateIndexes(), SCH_CONNECTIVITY::PUBLICATION::ROW_UPDATE::upserts, and SCH_CONNECTIVITY::BUS_SCHEMA::VECTOR.
|
private |
Definition at line 79 of file conn_indexes.cpp.
References SCH_CONNECTIVITY::BUNDLE, SCH_CONNECTIVITY::BUS_SCHEMA::GROUP, group, m_busSignatures, m_components, and m_equivalentBuses.
Referenced by UpdateIndexes().
|
private |
Definition at line 125 of file conn_indexes.cpp.
References SCH_CONNECTIVITY::BUNDLE, SCH_CONNECTIVITY::INVALID_ID, m_busMembers, m_busParents, m_byName, m_components, m_keys, m_slotComponents, ParentsOf(), SCH_CONNECTIVITY::SIGNAL, and UpdateBusSignatures().
Referenced by Update().
|
private |
Definition at line 189 of file conn_publish.h.
Referenced by Auxiliary(), Clear(), PUBLICATION(), and Update().
|
private |
Definition at line 195 of file conn_publish.h.
Referenced by Clear(), MembersOf(), and UpdateIndexes().
|
private |
Definition at line 196 of file conn_publish.h.
Referenced by Clear(), ParentsOf(), and UpdateIndexes().
|
private |
Definition at line 197 of file conn_publish.h.
Referenced by Clear(), EquivalentBusNames(), Update(), and UpdateBusSignatures().
|
private |
Definition at line 193 of file conn_publish.h.
Referenced by ByName(), Clear(), FindByName(), PUBLICATION(), Update(), and UpdateIndexes().
|
private |
Definition at line 201 of file conn_publish.h.
|
private |
Definition at line 199 of file conn_publish.h.
Referenced by Clear(), Components(), EquivalentBusNames(), PrepareRows(), Update(), UpdateBusSignatures(), and UpdateIndexes().
|
private |
Definition at line 198 of file conn_publish.h.
Referenced by Clear(), and UpdateBusSignatures().
|
private |
Definition at line 188 of file conn_publish.h.
Referenced by EquivalentBusNames(), FindByName(), PrepareRows(), PUBLICATION(), Update(), and UpdateIndexes().
|
private |
Definition at line 192 of file conn_publish.h.
Referenced by ApplyRows(), Clear(), Netclasses(), PrepareRows(), and PUBLICATION().
|
private |
Never reset, so codes do not repeat.
Definition at line 202 of file conn_publish.h.
Referenced by Update().
|
private |
Never reset, so codes do not repeat.
Definition at line 203 of file conn_publish.h.
Referenced by Update().
|
private |
Definition at line 191 of file conn_publish.h.
Referenced by ApplyRows(), Clear(), PrepareRows(), and PUBLICATION().
|
private |
Definition at line 190 of file conn_publish.h.
Referenced by ApplyRows(), Clear(), PrepareRows(), PUBLICATION(), Rows(), and Update().
|
private |
Definition at line 194 of file conn_publish.h.
Referenced by Clear(), PUBLICATION(), SlotComponents(), and UpdateIndexes().
|
private |
Definition at line 200 of file conn_publish.h.