KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SCH_CONNECTIVITY::PUBLICATION Class Reference

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 COMPONENTSComponents () const
 
const CHANGE_SETChanges () const
 
const NAME_INDEXByName () const
 
const SLOT_INDEXSlotComponents () const
 
std::optional< NODE_IDFindByName (const wxString &aName) const
 
std::vector< wxString > EquivalentBusNames (const wxString &aName) const
 
std::span< const NODE_IDMembersOf (NODE_ID aBundle) const
 
std::span< const NODE_IDParentsOf (NODE_ID aSignal) const
 
const AUXILIARYAuxiliary () const
 
const ROWSRows () const
 
const CLASS_ASSIGNMENTSNetclasses () 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_KEYSm_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.
 

Detailed Description

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().

See also
Schematic Connectivity Engine

Definition at line 113 of file conn_publish.h.

Member Typedef Documentation

◆ BUS_SIGNATURE

using SCH_CONNECTIVITY::PUBLICATION::BUS_SIGNATURE = std::pair<NAME_ID, std::vector<NAME_ID>>
private

Definition at line 149 of file conn_publish.h.

◆ BUS_SIGNATURES

using SCH_CONNECTIVITY::PUBLICATION::BUS_SIGNATURES = std::map<NODE_ID, EQUIVALENT_BUSES::iterator>
private

Definition at line 151 of file conn_publish.h.

◆ CLASS_ASSIGNMENTS

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.

◆ COMPONENT_LINKS

Definition at line 120 of file conn_publish.h.

◆ COMPONENTS

◆ EQUIVALENT_BUSES

Definition at line 150 of file conn_publish.h.

◆ NAME_INDEX

Definition at line 118 of file conn_publish.h.

◆ ROW_INPUTS

using SCH_CONNECTIVITY::PUBLICATION::ROW_INPUTS = std::map<RECORD_KEY, std::shared_ptr<const ROW_INPUT>, KEY_LESS>
private

Definition at line 164 of file conn_publish.h.

◆ ROWS

Definition at line 122 of file conn_publish.h.

◆ SLOT_INDEX

Definition at line 119 of file conn_publish.h.

◆ SLOT_INPUTS

Definition at line 152 of file conn_publish.h.

Constructor & Destructor Documentation

◆ PUBLICATION()

SCH_CONNECTIVITY::PUBLICATION::PUBLICATION ( SESSION_KEYS & aKeys)
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.

Member Function Documentation

◆ ApplyRows()

void SCH_CONNECTIVITY::PUBLICATION::ApplyRows ( ROW_UPDATE && aUpdate)
private

Definition at line 344 of file conn_rows.cpp.

References m_netclasses, m_rowInputs, and m_rows.

Referenced by Update().

◆ Auxiliary()

const AUXILIARY & SCH_CONNECTIVITY::PUBLICATION::Auxiliary ( ) const
inline

Definition at line 143 of file conn_publish.h.

References m_auxiliary.

Referenced by SCH_CONNECTIVITY::FACADE::Recalculate().

◆ ByName()

const NAME_INDEX & SCH_CONNECTIVITY::PUBLICATION::ByName ( ) const
inline

Definition at line 134 of file conn_publish.h.

References m_byName.

◆ Changes()

const CHANGE_SET & SCH_CONNECTIVITY::PUBLICATION::Changes ( ) const
inline

◆ Clear()

void SCH_CONNECTIVITY::PUBLICATION::Clear ( )

◆ Components()

const COMPONENTS & SCH_CONNECTIVITY::PUBLICATION::Components ( ) const
inline

Definition at line 131 of file conn_publish.h.

References m_components.

◆ EquivalentBusNames()

std::vector< wxString > SCH_CONNECTIVITY::PUBLICATION::EquivalentBusNames ( const wxString & aName) const

◆ FindByName()

std::optional< NODE_ID > SCH_CONNECTIVITY::PUBLICATION::FindByName ( const wxString & aName) const

◆ MembersOf()

std::span< const NODE_ID > SCH_CONNECTIVITY::PUBLICATION::MembersOf ( NODE_ID aBundle) const

Definition at line 37 of file conn_indexes.cpp.

References m_busMembers.

Referenced by SCH_CONNECTIVITY::FACADE::BusWithMembers(), and Update().

◆ Netclasses()

const CLASS_ASSIGNMENTS & SCH_CONNECTIVITY::PUBLICATION::Netclasses ( ) const
inline

Definition at line 146 of file conn_publish.h.

References m_netclasses.

◆ ParentsOf()

std::span< const NODE_ID > SCH_CONNECTIVITY::PUBLICATION::ParentsOf ( NODE_ID aSignal) const

Definition at line 43 of file conn_indexes.cpp.

References m_busParents.

Referenced by SCH_CONNECTIVITY::FACADE::BundlesOf(), and UpdateIndexes().

◆ PrepareRows()

PUBLICATION::ROW_UPDATE SCH_CONNECTIVITY::PUBLICATION::PrepareRows ( const COMPONENTS & aCurrent,
const RECORD_STORE::RECORD_CACHE & aRecords,
const SLOT_INPUTS & aSlots,
CHANGE_SET & aChanges )
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().

◆ Rows()

const ROWS & SCH_CONNECTIVITY::PUBLICATION::Rows ( ) const
inline

Definition at line 145 of file conn_publish.h.

References m_rows.

Referenced by BOOST_AUTO_TEST_CASE().

◆ SlotComponents()

const SLOT_INDEX & SCH_CONNECTIVITY::PUBLICATION::SlotComponents ( ) const
inline

Definition at line 135 of file conn_publish.h.

References m_slotComponents.

◆ Update()

◆ UpdateBusSignatures()

void SCH_CONNECTIVITY::PUBLICATION::UpdateBusSignatures ( const COMPONENTS & aCurrent,
const SLOT_INPUTS & aSlots )
private

◆ UpdateIndexes()

void SCH_CONNECTIVITY::PUBLICATION::UpdateIndexes ( const COMPONENTS & aCurrent,
const SLOT_INPUTS & aSlots )
private

Member Data Documentation

◆ m_auxiliary

AUXILIARY SCH_CONNECTIVITY::PUBLICATION::m_auxiliary
private

Definition at line 189 of file conn_publish.h.

Referenced by Auxiliary(), Clear(), PUBLICATION(), and Update().

◆ m_busMembers

COMPONENT_LINKS SCH_CONNECTIVITY::PUBLICATION::m_busMembers
private

Definition at line 195 of file conn_publish.h.

Referenced by Clear(), MembersOf(), and UpdateIndexes().

◆ m_busParents

COMPONENT_LINKS SCH_CONNECTIVITY::PUBLICATION::m_busParents
private

Definition at line 196 of file conn_publish.h.

Referenced by Clear(), ParentsOf(), and UpdateIndexes().

◆ m_busSignatures

BUS_SIGNATURES SCH_CONNECTIVITY::PUBLICATION::m_busSignatures
private

Definition at line 197 of file conn_publish.h.

Referenced by Clear(), EquivalentBusNames(), Update(), and UpdateBusSignatures().

◆ m_byName

NAME_INDEX SCH_CONNECTIVITY::PUBLICATION::m_byName
private

Definition at line 193 of file conn_publish.h.

Referenced by ByName(), Clear(), FindByName(), PUBLICATION(), Update(), and UpdateIndexes().

◆ m_changes

CHANGE_SET SCH_CONNECTIVITY::PUBLICATION::m_changes
private

Definition at line 201 of file conn_publish.h.

Referenced by Changes(), Clear(), and Update().

◆ m_components

COMPONENTS SCH_CONNECTIVITY::PUBLICATION::m_components
private

◆ m_equivalentBuses

EQUIVALENT_BUSES SCH_CONNECTIVITY::PUBLICATION::m_equivalentBuses
private

Definition at line 198 of file conn_publish.h.

Referenced by Clear(), and UpdateBusSignatures().

◆ m_keys

SESSION_KEYS& SCH_CONNECTIVITY::PUBLICATION::m_keys
private

◆ m_netclasses

CLASS_ASSIGNMENTS SCH_CONNECTIVITY::PUBLICATION::m_netclasses
private

Definition at line 192 of file conn_publish.h.

Referenced by ApplyRows(), Clear(), Netclasses(), PrepareRows(), and PUBLICATION().

◆ m_nextNetCode

int SCH_CONNECTIVITY::PUBLICATION::m_nextNetCode = 1
private

Never reset, so codes do not repeat.

Definition at line 202 of file conn_publish.h.

Referenced by Update().

◆ m_nextSubgraphCode

uint32_t SCH_CONNECTIVITY::PUBLICATION::m_nextSubgraphCode = 1
private

Never reset, so codes do not repeat.

Definition at line 203 of file conn_publish.h.

Referenced by Update().

◆ m_rowInputs

ROW_INPUTS SCH_CONNECTIVITY::PUBLICATION::m_rowInputs
private

Definition at line 191 of file conn_publish.h.

Referenced by ApplyRows(), Clear(), PrepareRows(), and PUBLICATION().

◆ m_rows

ROWS SCH_CONNECTIVITY::PUBLICATION::m_rows
private

Definition at line 190 of file conn_publish.h.

Referenced by ApplyRows(), Clear(), PrepareRows(), PUBLICATION(), Rows(), and Update().

◆ m_slotComponents

SLOT_INDEX SCH_CONNECTIVITY::PUBLICATION::m_slotComponents
private

Definition at line 194 of file conn_publish.h.

Referenced by Clear(), PUBLICATION(), SlotComponents(), and UpdateIndexes().

◆ m_versions

std::map<NODE_ID, uint64_t> SCH_CONNECTIVITY::PUBLICATION::m_versions
private

Definition at line 200 of file conn_publish.h.

Referenced by Clear(), and Update().


The documentation for this class was generated from the following files: