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

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

#include <drc_item.h>

Inheritance diagram for BOARD_RC_ITEM_RESOLVER:
RC_ITEM_RESOLVER

Public Member Functions

 BOARD_RC_ITEM_RESOLVER (const BOARD &aBoard)
 
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 BOARD & m_board
 
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 PCB items by their KIID.

Definition at line 348 of file drc_item.h.

Constructor & Destructor Documentation

◆ BOARD_RC_ITEM_RESOLVER()

BOARD_RC_ITEM_RESOLVER::BOARD_RC_ITEM_RESOLVER ( const BOARD & aBoard)
inlineexplicit

Definition at line 351 of file drc_item.h.

References m_board.

Member Function Documentation

◆ doResolveItemById()

EDA_ITEM * BOARD_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 772 of file drc_item.cpp.

References m_board.

◆ 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_board

const BOARD& BOARD_RC_ITEM_RESOLVER::m_board
private

Definition at line 359 of file drc_item.h.

Referenced by BOARD_RC_ITEM_RESOLVER(), and 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().


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