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

An implementation of the RC_ITEM_LIST interface which uses the global SHEETLIST to fulfill the contract. More...

#include <erc_settings.h>

Inheritance diagram for SHEETLIST_ERC_ITEMS_PROVIDER:
RC_ITEMS_PROVIDER

Public Member Functions

 SHEETLIST_ERC_ITEMS_PROVIDER (SCHEMATIC *aSchematic)
 
 SHEETLIST_ERC_ITEMS_PROVIDER (const SHEETLIST_ERC_ITEMS_PROVIDER &)=delete
 
SHEETLIST_ERC_ITEMS_PROVIDER & operator= (const SHEETLIST_ERC_ITEMS_PROVIDER &)=delete
 
void SetSeverities (int aSeverities) override
 
int GetSeverities () const override
 
int GetCount (int aSeverity=-1) const override
 
std::shared_ptr< RC_ITEM > GetItem (int aIndex) const override
 Retrieve a RC_ITEM by index.
 
std::shared_ptr< ERC_ITEM > GetERCItem (int aIndex) const
 
void DeleteItem (int aIndex, bool aDeep) override
 Remove (and optionally deletes) the indexed item from the list.
 
void SetMarkerExcluded (SCH_MARKER *aMarker, bool aExcluded, const wxString &aComment=wxEmptyString)
 Set the exclusion state of a marker while keeping the cached severity counts in sync.
 

Private Member Functions

void visitMarkers (std::function< void(SCH_MARKER *)> aVisitor) const
 
SEVERITY markerSeverity (SCH_MARKER *aMarker) const
 
void adjustCount (SEVERITY aSeverity, int aDelta)
 

Private Attributes

SCHEMATIC * m_schematic
 
int m_severities
 
std::vector< SCH_MARKER * > m_filteredMarkers
 
int m_errorCount
 
int m_warningCount
 
int m_exclusionCount
 

Detailed Description

An implementation of the RC_ITEM_LIST interface which uses the global SHEETLIST to fulfill the contract.

Definition at line 262 of file erc_settings.h.

Constructor & Destructor Documentation

◆ SHEETLIST_ERC_ITEMS_PROVIDER() [1/2]

SHEETLIST_ERC_ITEMS_PROVIDER::SHEETLIST_ERC_ITEMS_PROVIDER ( SCHEMATIC * aSchematic)
inline

◆ SHEETLIST_ERC_ITEMS_PROVIDER() [2/2]

SHEETLIST_ERC_ITEMS_PROVIDER::SHEETLIST_ERC_ITEMS_PROVIDER ( const SHEETLIST_ERC_ITEMS_PROVIDER & )
delete

Member Function Documentation

◆ adjustCount()

void SHEETLIST_ERC_ITEMS_PROVIDER::adjustCount ( SEVERITY aSeverity,
int aDelta )
private

◆ DeleteItem()

void SHEETLIST_ERC_ITEMS_PROVIDER::DeleteItem ( int aIndex,
bool aDeep )
overridevirtual

Remove (and optionally deletes) the indexed item from the list.

Parameters
aIndexis the index of the item to delete.
aDeepIf true, the source item should be deleted as well as its entry in the list.

Implements RC_ITEMS_PROVIDER.

Definition at line 526 of file erc_settings.cpp.

References adjustCount(), SCH_SCREENS::DeleteMarker(), m_filteredMarkers, m_schematic, and markerSeverity().

◆ GetCount()

◆ GetERCItem()

std::shared_ptr< ERC_ITEM > SHEETLIST_ERC_ITEMS_PROVIDER::GetERCItem ( int aIndex) const

Definition at line 494 of file erc_settings.cpp.

References MARKER_BASE::GetRCItem(), and m_filteredMarkers.

Referenced by BOOST_FIXTURE_TEST_CASE(), and GetItem().

◆ GetItem()

◆ GetSeverities()

int SHEETLIST_ERC_ITEMS_PROVIDER::GetSeverities ( ) const
overridevirtual

Implements RC_ITEMS_PROVIDER.

Definition at line 468 of file erc_settings.cpp.

References m_severities.

◆ markerSeverity()

SEVERITY SHEETLIST_ERC_ITEMS_PROVIDER::markerSeverity ( SCH_MARKER * aMarker) const
private

◆ operator=()

SHEETLIST_ERC_ITEMS_PROVIDER & SHEETLIST_ERC_ITEMS_PROVIDER::operator= ( const SHEETLIST_ERC_ITEMS_PROVIDER & )
delete

◆ SetMarkerExcluded()

void SHEETLIST_ERC_ITEMS_PROVIDER::SetMarkerExcluded ( SCH_MARKER * aMarker,
bool aExcluded,
const wxString & aComment = wxEmptyString )

Set the exclusion state of a marker while keeping the cached severity counts in sync.

Parameters
aMarkeris the marker to include or exclude.
aExcludedtrue to exclude the marker, false to restore it.
aCommentoptional exclusion comment.

Definition at line 508 of file erc_settings.cpp.

References adjustCount(), MARKER_BASE::IsExcluded(), markerSeverity(), and MARKER_BASE::SetExcluded().

Referenced by BOOST_FIXTURE_TEST_CASE(), and setMarkerExcluded().

◆ SetSeverities()

◆ visitMarkers()

void SHEETLIST_ERC_ITEMS_PROVIDER::visitMarkers ( std::function< void(SCH_MARKER *)> aVisitor) const
private

Member Data Documentation

◆ m_errorCount

int SHEETLIST_ERC_ITEMS_PROVIDER::m_errorCount
private

Definition at line 269 of file erc_settings.h.

Referenced by adjustCount(), GetCount(), SetSeverities(), and SHEETLIST_ERC_ITEMS_PROVIDER().

◆ m_exclusionCount

int SHEETLIST_ERC_ITEMS_PROVIDER::m_exclusionCount
private

Definition at line 271 of file erc_settings.h.

Referenced by adjustCount(), GetCount(), SetSeverities(), and SHEETLIST_ERC_ITEMS_PROVIDER().

◆ m_filteredMarkers

std::vector<SCH_MARKER*> SHEETLIST_ERC_ITEMS_PROVIDER::m_filteredMarkers
private

Definition at line 267 of file erc_settings.h.

Referenced by DeleteItem(), GetCount(), GetERCItem(), and SetSeverities().

◆ m_schematic

SCHEMATIC* SHEETLIST_ERC_ITEMS_PROVIDER::m_schematic
private

◆ m_severities

int SHEETLIST_ERC_ITEMS_PROVIDER::m_severities
private

Definition at line 266 of file erc_settings.h.

Referenced by GetSeverities(), SetSeverities(), and SHEETLIST_ERC_ITEMS_PROVIDER().

◆ m_warningCount

int SHEETLIST_ERC_ITEMS_PROVIDER::m_warningCount
private

Definition at line 270 of file erc_settings.h.

Referenced by adjustCount(), GetCount(), SetSeverities(), and SHEETLIST_ERC_ITEMS_PROVIDER().


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