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

An incremental DiagnoseBoardConstraints for the interactive edit path. More...

#include <board_constraint_adapter.h>

Classes

struct  CACHE_ENTRY
 

Public Member Functions

BOARD_CONSTRAINT_DIAGNOSTICS Diagnose (BOARD *aBoard)
 Diagnose every cluster reusing cached per-cluster results whose solve inputs are unchanged.
 
void Clear ()
 Drop the cache call when the board or view reloads and item-identity assumptions break.
 
std::size_t SolveCount () const
 Clusters actually re-solved across this diagnoser lifetime for testing cache isolation.
 

Private Attributes

std::map< std::vector< KIID >, CACHE_ENTRYm_cache
 
std::size_t m_solveCount = 0
 

Detailed Description

An incremental DiagnoseBoardConstraints for the interactive edit path.

Caches each cluster diagnosis keyed by constraint-id set with a hash of every solve input so a model change re-solves only the affected clusters matching DiagnoseBoardConstraints exactly

Definition at line 440 of file board_constraint_adapter.h.

Member Function Documentation

◆ Clear()

void BOARD_CONSTRAINT_DIAGNOSER::Clear ( )

Drop the cache call when the board or view reloads and item-identity assumptions break.

Definition at line 2816 of file board_constraint_adapter.cpp.

References m_cache.

◆ Diagnose()

BOARD_CONSTRAINT_DIAGNOSTICS BOARD_CONSTRAINT_DIAGNOSER::Diagnose ( BOARD * aBoard)

Diagnose every cluster reusing cached per-cluster results whose solve inputs are unchanged.

Definition at line 2822 of file board_constraint_adapter.cpp.

References assembleClusterInto(), buildShapeConstraintMap(), collectAllConstraints(), collectConstraintCluster(), dedupErrored(), diagnoseSingleCluster(), hashCluster(), m_cache, m_solveCount, and result.

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().

◆ SolveCount()

std::size_t BOARD_CONSTRAINT_DIAGNOSER::SolveCount ( ) const
inline

Clusters actually re-solved across this diagnoser lifetime for testing cache isolation.

Definition at line 450 of file board_constraint_adapter.h.

References m_solveCount.

Referenced by BOOST_AUTO_TEST_CASE().

Member Data Documentation

◆ m_cache

std::map<std::vector<KIID>, CACHE_ENTRY> BOARD_CONSTRAINT_DIAGNOSER::m_cache
private

Definition at line 461 of file board_constraint_adapter.h.

Referenced by Clear(), and Diagnose().

◆ m_solveCount

std::size_t BOARD_CONSTRAINT_DIAGNOSER::m_solveCount = 0
private

Definition at line 462 of file board_constraint_adapter.h.

Referenced by Diagnose(), and SolveCount().


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