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

#include <cleanup_item.h>

Inheritance diagram for CLEANUP_ITEM:
RC_ITEM

Public Types

typedef std::vector< KIIDKIIDS
 

Public Member Functions

 CLEANUP_ITEM (int aErrorCode)
 
wxString GetErrorText (int aErrorCode=-1, bool aTranslate=true) const
 Return the string form of a drc error code. More...
 
void SetErrorMessage (const wxString &aMessage)
 
void SetItems (const KIIDS &aIds)
 
void SetItems (const EDA_ITEM *aItem, const EDA_ITEM *bItem=nullptr, const EDA_ITEM *cItem=nullptr, const EDA_ITEM *dItem=nullptr)
 
void SetItems (const KIID &aItem, const KIID &bItem=niluuid, const KIID &cItem=niluuid, const KIID &dItem=niluuid)
 
void AddItem (EDA_ITEM *aItem)
 
virtual KIID GetMainItemID () const
 
virtual KIID GetAuxItemID () const
 
virtual KIID GetAuxItem2ID () const
 
virtual KIID GetAuxItem3ID () const
 
std::vector< KIIDGetIDs () const
 
void SetParent (MARKER_BASE *aMarker)
 
MARKER_BASEGetParent () const
 
virtual wxString ShowReport (UNITS_PROVIDER *aUnitsProvider, SEVERITY aSeverity, const std::map< KIID, EDA_ITEM * > &aItemMap) const
 Translate this object into a text string suitable for saving to disk in a report. More...
 
virtual void GetJsonViolation (RC_JSON::VIOLATION &aViolation, UNITS_PROVIDER *aUnitsProvider, SEVERITY aSeverity, const std::map< KIID, EDA_ITEM * > &aItemMap) const
 Translate this object into an RC_JSON::VIOLATION object. More...
 
int GetErrorCode () const
 
void SetErrorCode (int aCode)
 
virtual wxString GetErrorMessage () const
 
wxString GetErrorText () const
 
wxString GetSettingsKey () const
 
virtual wxString GetViolatingRuleDesc () const
 

Static Protected Member Functions

static wxString getSeverityString (SEVERITY aSeverity)
 

Protected Attributes

int m_errorCode
 The error code's numeric value. More...
 
wxString m_errorTitle
 The string describing the type of error. More...
 
wxString m_settingsKey
 The key used to describe this type of error in settings. More...
 
MARKER_BASEm_parent
 The marker this item belongs to, if any. More...
 
KIIDS m_ids
 

Private Attributes

wxString m_errorMessage
 

Detailed Description

Definition at line 49 of file cleanup_item.h.

Member Typedef Documentation

◆ KIIDS

typedef std::vector<KIID> RC_ITEM::KIIDS
inherited

Definition at line 81 of file rc_item.h.

Constructor & Destructor Documentation

◆ CLEANUP_ITEM()

CLEANUP_ITEM::CLEANUP_ITEM ( int  aErrorCode)

Member Function Documentation

◆ AddItem()

void RC_ITEM::AddItem ( EDA_ITEM aItem)
inherited

Definition at line 56 of file rc_item.cpp.

References RC_ITEM::m_ids, and EDA_ITEM::m_Uuid.

◆ GetAuxItem2ID()

virtual KIID RC_ITEM::GetAuxItem2ID ( ) const
inlinevirtualinherited

Reimplemented in DRC_ITEM.

Definition at line 123 of file rc_item.h.

References RC_ITEM::m_ids, and niluuid.

◆ GetAuxItem3ID()

virtual KIID RC_ITEM::GetAuxItem3ID ( ) const
inlinevirtualinherited

Reimplemented in DRC_ITEM.

Definition at line 124 of file rc_item.h.

References RC_ITEM::m_ids, and niluuid.

◆ GetAuxItemID()

virtual KIID RC_ITEM::GetAuxItemID ( ) const
inlinevirtualinherited

Definition at line 122 of file rc_item.h.

References RC_ITEM::m_ids, and niluuid.

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

◆ GetErrorCode()

◆ GetErrorMessage()

wxString RC_ITEM::GetErrorMessage ( ) const
virtualinherited
Returns
the error message describing the specific details of a RC_ITEM. For instance, "Clearance violation (netclass '100ohm' clearance 0.4000mm; actual 0.3200mm)"

Definition at line 39 of file rc_item.cpp.

References RC_ITEM::GetErrorText(), and RC_ITEM::m_errorMessage.

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

◆ GetErrorText() [1/2]

wxString RC_ITEM::GetErrorText ( ) const
inlineinherited
Returns
the error text for the class of error of this RC_ITEM represents. For instance, "Clearance violation".

Definition at line 166 of file rc_item.h.

References RC_ITEM::m_errorTitle.

Referenced by CLEANUP_ITEM(), RC_ITEM::GetErrorMessage(), and PANEL_SETUP_SEVERITIES::PANEL_SETUP_SEVERITIES().

◆ GetErrorText() [2/2]

wxString CLEANUP_ITEM::GetErrorText ( int  aErrorCode = -1,
bool  aTranslate = true 
) const

◆ GetIDs()

std::vector< KIID > RC_ITEM::GetIDs ( ) const
inlineinherited

Definition at line 126 of file rc_item.h.

References RC_ITEM::m_ids.

◆ GetJsonViolation()

void RC_ITEM::GetJsonViolation ( RC_JSON::VIOLATION aViolation,
UNITS_PROVIDER aUnitsProvider,
SEVERITY  aSeverity,
const std::map< KIID, EDA_ITEM * > &  aItemMap 
) const
virtualinherited

◆ GetMainItemID()

virtual KIID RC_ITEM::GetMainItemID ( ) const
inlinevirtualinherited

Definition at line 121 of file rc_item.h.

References RC_ITEM::m_ids, and niluuid.

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

◆ GetParent()

MARKER_BASE * RC_ITEM::GetParent ( ) const
inlineinherited

Definition at line 129 of file rc_item.h.

References RC_ITEM::m_parent.

◆ GetSettingsKey()

wxString RC_ITEM::GetSettingsKey ( ) const
inlineinherited

Definition at line 171 of file rc_item.h.

References RC_ITEM::m_settingsKey.

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

◆ getSeverityString()

wxString RC_ITEM::getSeverityString ( SEVERITY  aSeverity)
staticprotectedinherited

◆ GetViolatingRuleDesc()

virtual wxString RC_ITEM::GetViolatingRuleDesc ( ) const
inlinevirtualinherited

Reimplemented in DRC_ITEM.

Definition at line 176 of file rc_item.h.

Referenced by RC_ITEM::ShowReport().

◆ SetErrorCode()

void RC_ITEM::SetErrorCode ( int  aCode)
inlineinherited

Definition at line 154 of file rc_item.h.

References RC_ITEM::m_errorCode.

◆ SetErrorMessage()

void RC_ITEM::SetErrorMessage ( const wxString &  aMessage)
inlineinherited

Definition at line 101 of file rc_item.h.

References RC_ITEM::m_errorMessage.

◆ SetItems() [1/3]

void RC_ITEM::SetItems ( const EDA_ITEM aItem,
const EDA_ITEM bItem = nullptr,
const EDA_ITEM cItem = nullptr,
const EDA_ITEM dItem = nullptr 
)
inherited

Definition at line 62 of file rc_item.cpp.

References RC_ITEM::m_ids, and EDA_ITEM::m_Uuid.

◆ SetItems() [2/3]

void RC_ITEM::SetItems ( const KIID aItem,
const KIID bItem = niluuid,
const KIID cItem = niluuid,
const KIID dItem = niluuid 
)
inlineinherited

Definition at line 110 of file rc_item.h.

References RC_ITEM::m_ids.

◆ SetItems() [3/3]

void RC_ITEM::SetItems ( const KIIDS aIds)
inlineinherited

Definition at line 103 of file rc_item.h.

References RC_ITEM::m_ids.

◆ SetParent()

void RC_ITEM::SetParent ( MARKER_BASE aMarker)
inlineinherited

Definition at line 128 of file rc_item.h.

References RC_ITEM::m_parent.

◆ ShowReport()

wxString RC_ITEM::ShowReport ( UNITS_PROVIDER aUnitsProvider,
SEVERITY  aSeverity,
const std::map< KIID, EDA_ITEM * > &  aItemMap 
) const
virtualinherited

Translate this object into a text string suitable for saving to disk in a report.

Returns
wxString - the simple multi-line report text.

Definition at line 100 of file rc_item.cpp.

References RC_ITEM::GetAuxItemID(), MARKER_BASE::GetComment(), RC_ITEM::GetErrorMessage(), EDA_ITEM::GetItemDescription(), RC_ITEM::GetMainItemID(), EDA_ITEM::GetPosition(), RC_ITEM::GetSettingsKey(), RC_ITEM::getSeverityString(), RC_ITEM::GetViolatingRuleDesc(), MARKER_BASE::IsExcluded(), RC_ITEM::m_parent, and showCoord().

Member Data Documentation

◆ m_errorCode

int RC_ITEM::m_errorCode
protectedinherited

◆ m_errorMessage

wxString CLEANUP_ITEM::m_errorMessage
private

Definition at line 60 of file cleanup_item.h.

◆ m_errorTitle

wxString RC_ITEM::m_errorTitle
protectedinherited

The string describing the type of error.

Definition at line 186 of file rc_item.h.

Referenced by CLEANUP_ITEM(), DRC_ITEM::DRC_ITEM(), ERC_ITEM::ERC_ITEM(), RC_ITEM::GetErrorText(), and RC_ITEM::RC_ITEM().

◆ m_ids

◆ m_parent

MARKER_BASE* RC_ITEM::m_parent
protectedinherited

The marker this item belongs to, if any.

Definition at line 188 of file rc_item.h.

Referenced by DRC_ITEM::DRC_ITEM(), RC_ITEM::GetJsonViolation(), RC_ITEM::GetParent(), RC_ITEM::RC_ITEM(), RC_ITEM::SetParent(), and RC_ITEM::ShowReport().

◆ m_settingsKey

wxString RC_ITEM::m_settingsKey
protectedinherited

The key used to describe this type of error in settings.

Definition at line 187 of file rc_item.h.

Referenced by DRC_ITEM::DRC_ITEM(), ERC_ITEM::ERC_ITEM(), RC_ITEM::GetSettingsKey(), and RC_ITEM::RC_ITEM().


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