KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SCH_RC_ITEM_RESOLVER Class Reference

Implements the RC_ITEM_RESOLVER interface to resolve schematic items by their KIID. More...

#include <erc_item.h>

Inheritance diagram for SCH_RC_ITEM_RESOLVER:
RC_ITEM_RESOLVER

Public Member Functions

 SCH_RC_ITEM_RESOLVER (const SCH_SHEET_LIST &aSheetList)
 
EDA_ITEM * doResolveItemById (const KIID &aKiid) const override
 The actual resolution logic for an item by its KIID, must be implemented against the actual item store of the inheriting class.
 
EDA_ITEM * ResolveItemById (const KIID &aKiid) const
 Resolve an item by its KIID.
 

Private Attributes

const SCH_SHEET_LIST & m_sheetList
 
std::unordered_map< KIID, EDA_ITEM * > m_items
 
bool m_itemsBuilt = false
 
std::unordered_set< KIID > m_resolutionMisses
 Store of missed resolution attempts (KIIDs that could not be resolved).
 

Detailed Description

Implements the RC_ITEM_RESOLVER interface to resolve schematic items by their KIID.

Definition at line 275 of file erc_item.h.

Constructor & Destructor Documentation

◆ SCH_RC_ITEM_RESOLVER()

SCH_RC_ITEM_RESOLVER::SCH_RC_ITEM_RESOLVER ( const SCH_SHEET_LIST & aSheetList)
inlineexplicit

Definition at line 278 of file erc_item.h.

References m_sheetList.

Member Function Documentation

◆ doResolveItemById()

EDA_ITEM * SCH_RC_ITEM_RESOLVER::doResolveItemById ( const KIID & aKiid) const
overridevirtual

The actual resolution logic for an item by its KIID, must be implemented against the actual item store of the inheriting class.

Parameters
aKiidThe KIID of the item to resolve.
Returns
A pointer to the resolved item, or nullptr if not found. This pointer is borrowed and should not be deleted by the caller.

Implements RC_ITEM_RESOLVER.

Definition at line 547 of file erc_item.cpp.

References m_items, m_itemsBuilt, and m_sheetList.

◆ ResolveItemById()

EDA_ITEM * RC_ITEM_RESOLVER::ResolveItemById ( const KIID & aKiid) const
inlineinherited

Resolve an item by its KIID.

Parameters
aKiidThe KIID of the item to resolve.
Returns
A pointer to the resolved item, or nullptr if not found. This pointer is borrowed and should not be deleted by the caller.

Definition at line 98 of file rc_item.h.

References doResolveItemById(), m_resolutionMisses, and niluuid.

Referenced by BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), RC_ITEM::GetJsonViolation(), and RC_ITEM::ShowReport().

Member Data Documentation

◆ m_items

std::unordered_map<KIID, EDA_ITEM*> SCH_RC_ITEM_RESOLVER::m_items
mutableprivate

Definition at line 290 of file erc_item.h.

Referenced by doResolveItemById().

◆ m_itemsBuilt

bool SCH_RC_ITEM_RESOLVER::m_itemsBuilt = false
mutableprivate

Definition at line 291 of file erc_item.h.

Referenced by doResolveItemById().

◆ m_resolutionMisses

std::unordered_set<KIID> RC_ITEM_RESOLVER::m_resolutionMisses
mutableprivateinherited

Store of missed resolution attempts (KIIDs that could not be resolved).

Definition at line 128 of file rc_item.h.

Referenced by ResolveItemById().

◆ m_sheetList

const SCH_SHEET_LIST& SCH_RC_ITEM_RESOLVER::m_sheetList
private

Definition at line 286 of file erc_item.h.

Referenced by doResolveItemById(), and SCH_RC_ITEM_RESOLVER().


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