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

Model-owned source resolver. More...

#include <conn_facade.h>

Public Member Functions

 FACADE ()
 
 ~FACADE ()
 
 FACADE (const FACADE &)=delete
 
FACADEoperator= (const FACADE &)=delete
 
void Recalculate (SCHEMATIC &aSchematic, bool aRebuild=false, const std::function< void(SCH_ITEM *)> &aChangedHandler={})
 Update the complete model and apply netclasses, dangling flags and dirty-state clearing.
 
SUBSCRIPTION Subscribe (std::function< void(const CHANGE_SET &)> aListener)
 
void Update (SCHEMATIC &aSchematic, bool aRebuild=false)
 
bool UpdateShadow (SCHEMATIC &aSchematic, const SCH_SHEET_LIST &aPaths, bool aRebuild=false)
 
void Update (const SCH_SHEET_LIST &aPaths, uint64_t aTextEpoch, const BUS_ALIASES &aAliases, bool aRebuild=false)
 
void Clear ()
 
void ApplyNetclasses (NET_SETTINGS &aSettings) const
 Replace label-derived assignments from a complete publication; invalidate changed net caches.
 
std::optional< ITEM_VIEWConnection (const KIID &aItem, const KIID_PATH &aPath) const
 
std::optional< NET_VIEWGetSubgraphForItem (const KIID &aItem, const KIID_PATH &aPath) const
 
std::vector< NET_GROUPGetNetMap () const
 Owned query-time groups in canonical name order, with unique instances in KIID_PATH order.
 
std::vector< wxString > NetNames () const
 
std::optional< NET_GROUPNetByName (const wxString &aName) const
 
std::vector< NET_GROUPBusWithMembers (const wxString &aName) const
 
std::vector< NET_GROUPBundlesOf (NODE_ID aSignal) const
 
std::vector< wxString > GetEquivalentBusNames (const wxString &aName) const
 
void PrepareTextChecks (SCHEMATIC &aSchematic, bool aIncludeDrawingSheet=false)
 
std::vector< TEXT_CHECK_FACTTextChecks (const KIID_PATH &aPath, bool aDrawingSheet=false) const
 
void PrepareSimulationModels (SCHEMATIC &aSchematic)
 
std::vector< SIMULATION_MODEL_FACTSimulationModels (const KIID_PATH &aPath) const
 
const PUBLICATIONPublished () const
 
const ENGINEEngine () const
 
const SESSION_KEYSKeys () const
 

Private Member Functions

void updateModel (SCHEMATIC &aSchematic, const SCH_SHEET_LIST &aPaths, bool aRebuild)
 Capture the text context and advance the text epoch when it or an external source changed.
 

Private Attributes

std::shared_ptr< FACADE_STATEm_state
 

Friends

class PUBLICATION_HOLD
 

Detailed Description

Model-owned source resolver.

Graph stages retain only keys and extracted values.

See also
Schematic Connectivity Engine for the full update, modification and overlay flows.

Definition at line 122 of file conn_facade.h.

Constructor & Destructor Documentation

◆ FACADE() [1/2]

SCH_CONNECTIVITY::FACADE::FACADE ( )

Definition at line 551 of file conn_facade.cpp.

References m_state.

Referenced by FACADE(), and operator=().

◆ ~FACADE()

SCH_CONNECTIVITY::FACADE::~FACADE ( )

Definition at line 553 of file conn_facade.cpp.

References Clear(), and m_state.

◆ FACADE() [2/2]

SCH_CONNECTIVITY::FACADE::FACADE ( const FACADE & )
delete

References FACADE().

Member Function Documentation

◆ ApplyNetclasses()

void SCH_CONNECTIVITY::FACADE::ApplyNetclasses ( NET_SETTINGS & aSettings) const

Replace label-derived assignments from a complete publication; invalidate changed net caches.

Call after Update for authoritative model application. Shadow updates never call this.

Definition at line 881 of file conn_facade.cpp.

References NET_SETTINGS::ClearCacheForNet(), NET_SETTINGS::ClearNetclassLabelAssignment(), NET_SETTINGS::GetNetclassLabelAssignments(), Keys(), SCH_CONNECTIVITY::SESSION_KEYS::Name(), name, Published(), and NET_SETTINGS::SetNetclassLabelAssignment().

Referenced by BOOST_AUTO_TEST_CASE(), SCH_CONNECTIVITY::Dump(), and Recalculate().

◆ BundlesOf()

std::vector< NET_GROUP > SCH_CONNECTIVITY::FACADE::BundlesOf ( NODE_ID aSignal) const

◆ BusWithMembers()

std::vector< NET_GROUP > SCH_CONNECTIVITY::FACADE::BusWithMembers ( const wxString & aName) const

◆ Clear()

void SCH_CONNECTIVITY::FACADE::Clear ( )

Definition at line 982 of file conn_facade.cpp.

References m_state.

Referenced by Recalculate(), Update(), Update(), UpdateShadow(), and ~FACADE().

◆ Connection()

◆ Engine()

const ENGINE & SCH_CONNECTIVITY::FACADE::Engine ( ) const

Definition at line 1009 of file conn_facade.cpp.

References m_state.

Referenced by ERC_TESTER::TestConnectivity().

◆ GetEquivalentBusNames()

std::vector< wxString > SCH_CONNECTIVITY::FACADE::GetEquivalentBusNames ( const wxString & aName) const

◆ GetNetMap()

std::vector< NET_GROUP > SCH_CONNECTIVITY::FACADE::GetNetMap ( ) const

Owned query-time groups in canonical name order, with unique instances in KIID_PATH order.

Reacquire the collection after Update; individual views resolve current publication.

Definition at line 1234 of file conn_facade.cpp.

References group, m_state, name, Published(), and result.

◆ GetSubgraphForItem()

std::optional< NET_VIEW > SCH_CONNECTIVITY::FACADE::GetSubgraphForItem ( const KIID & aItem,
const KIID_PATH & aPath ) const

◆ Keys()

const SESSION_KEYS & SCH_CONNECTIVITY::FACADE::Keys ( ) const

◆ NetByName()

std::optional< NET_GROUP > SCH_CONNECTIVITY::FACADE::NetByName ( const wxString & aName) const

◆ NetNames()

std::vector< wxString > SCH_CONNECTIVITY::FACADE::NetNames ( ) const

Definition at line 1249 of file conn_facade.cpp.

References Keys(), m_state, name, Published(), and result.

◆ operator=()

FACADE & SCH_CONNECTIVITY::FACADE::operator= ( const FACADE & )
delete

References FACADE().

◆ PrepareSimulationModels()

void SCH_CONNECTIVITY::FACADE::PrepareSimulationModels ( SCHEMATIC & aSchematic)

◆ PrepareTextChecks()

◆ Published()

◆ Recalculate()

void SCH_CONNECTIVITY::FACADE::Recalculate ( SCHEMATIC & aSchematic,
bool aRebuild = false,
const std::function< void(SCH_ITEM *)> & aChangedHandler = {} )

Update the complete model and apply netclasses, dangling flags and dirty-state clearing.

The current instance controls shared-screen display state; callbacks run after application. A callback that clears or destroys the model retires the remaining notifications in its batch.

Definition at line 574 of file conn_facade.cpp.

References SCH_CONNECTIVITY::NETCHAIN_MANAGER::ApplyNetChainNetclasses(), ApplyNetclasses(), SCH_CONNECTIVITY::PUBLICATION::Auxiliary(), SCHEMATIC::BuildSheetListSortedByPageNumbers(), SCH_CONNECTIVITY::CHANGE_SET::changedItems, SCH_CONNECTIVITY::PUBLICATION::Changes(), Clear(), SCH_SCREEN::ConnectivityId(), SCHEMATIC::CurrentSheet(), SCH_CONNECTIVITY::CHANGE_SET::Empty(), SCH_CONNECTIVITY::SESSION_KEYS::FindInstance(), SCH_SCREEN::GetConnectivityItem(), PROJECT::GetProjectFile(), SCH_CONNECTIVITY::INVALID_ID, SCHEMATIC::IsValid(), SCH_SCREEN::Items(), SCH_CONNECTIVITY::NETCHAIN_INPUT::NET::key, Keys(), m_state, SCH_NETCHAIN::MakeKey(), SCH_CONNECTIVITY::SESSION_KEYS::Name(), SCHEMATIC::NetChains(), PROJECT_FILE::NetSettings(), NO_RECURSE, path, SCH_SHEET_PATH::PathRef(), SCHEMATIC::Project(), Published(), SCH_CONNECTIVITY::NETCHAIN_MANAGER::Rebuild(), SCH_CONNECTIVITY::AUXILIARY::RuleAreasOf(), SCH_BUS_BUS_ENTRY_T, SCH_BUS_WIRE_ENTRY_T, SCH_DIRECTIVE_LABEL_T, SCH_GLOBAL_LABEL_T, SCH_HIER_LABEL_T, SCH_LABEL_T, SCH_LINE_T, SCH_PIN_T, SCH_SHEET_PIN_T, SCH_ITEM::SetConnectivityDirty(), SCH_CONNECTIVITY::NETCHAIN_INPUT::sheets, SCH_CONNECTIVITY::SIGNAL, SCH_CONNECTIVITY::NETCHAIN_INPUT::storage, EDA_ITEM::Type(), and updateModel().

◆ SimulationModels()

std::vector< SIMULATION_MODEL_FACT > SCH_CONNECTIVITY::FACADE::SimulationModels ( const KIID_PATH & aPath) const

Definition at line 1092 of file conn_facade.cpp.

References m_state.

◆ Subscribe()

SUBSCRIPTION SCH_CONNECTIVITY::FACADE::Subscribe ( std::function< void(const CHANGE_SET &)> aListener)
nodiscard

Definition at line 559 of file conn_facade.cpp.

References m_state.

Referenced by SCH_EDIT_FRAME::subscribeConnectivity().

◆ TextChecks()

std::vector< TEXT_CHECK_FACT > SCH_CONNECTIVITY::FACADE::TextChecks ( const KIID_PATH & aPath,
bool aDrawingSheet = false ) const

Definition at line 1062 of file conn_facade.cpp.

References m_state.

◆ Update() [1/2]

void SCH_CONNECTIVITY::FACADE::Update ( const SCH_SHEET_LIST & aPaths,
uint64_t aTextEpoch,
const BUS_ALIASES & aAliases,
bool aRebuild = false )

Definition at line 948 of file conn_facade.cpp.

References Clear(), SCH_SCREEN::ConnectivitySource(), Keys(), m_state, and path.

◆ Update() [2/2]

void SCH_CONNECTIVITY::FACADE::Update ( SCHEMATIC & aSchematic,
bool aRebuild = false )

◆ updateModel()

void SCH_CONNECTIVITY::FACADE::updateModel ( SCHEMATIC & aSchematic,
const SCH_SHEET_LIST & aPaths,
bool aRebuild )
private

Capture the text context and advance the text epoch when it or an external source changed.

Definition at line 923 of file conn_facade.cpp.

References SCHEMATIC::GetAllBusAliases(), m_state, and Update().

Referenced by Recalculate(), Update(), and UpdateShadow().

◆ UpdateShadow()

bool SCH_CONNECTIVITY::FACADE::UpdateShadow ( SCHEMATIC & aSchematic,
const SCH_SHEET_LIST & aPaths,
bool aRebuild = false )

Definition at line 859 of file conn_facade.cpp.

References Clear(), and updateModel().

Friends And Related Symbol Documentation

◆ PUBLICATION_HOLD

friend class PUBLICATION_HOLD
friend

Definition at line 177 of file conn_facade.h.

References PUBLICATION_HOLD.

Referenced by PUBLICATION_HOLD.

Member Data Documentation

◆ m_state


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