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

Container for an ERC exclusion, which is a SCH_MARKER plus an optional comment. More...

#include <erc_exclusion.h>

Classes

struct  IMPL
 

Public Member Functions

 ERC_EXCLUSION ()
 
 ERC_EXCLUSION (const ERC_EXCLUSION &aOther)
 
ERC_EXCLUSIONoperator= (const ERC_EXCLUSION &aOther)
 
 ~ERC_EXCLUSION ()
 
const kiapi::schematic::ErcExclusion & ToProto () const
 
std::string GetSortKey () const
 
wxString GetComment () const
 
void SetComment (const wxString &aComment)
 

Static Public Member Functions

static ERC_EXCLUSION FromMarker (const SCH_MARKER &aMarker)
 
static ERC_EXCLUSION FromProto (const kiapi::schematic::ErcExclusion &aMessage)
 
static ERC_EXCLUSION FromLegacyStrings (const SCH_SHEET_LIST &aSheetList, const wxString &aMarkerData, const wxString &aComment)
 

Private Attributes

std::unique_ptr< IMPLm_impl
 

Friends

bool operator== (const ERC_EXCLUSION &a, const ERC_EXCLUSION &b)
 
bool operator!= (const ERC_EXCLUSION &a, const ERC_EXCLUSION &b)
 
void to_json (nlohmann::json &aJson, const ERC_EXCLUSION &aEx)
 
void from_json (const nlohmann::json &aJson, ERC_EXCLUSION &aEx)
 

Detailed Description

Container for an ERC exclusion, which is a SCH_MARKER plus an optional comment.

This handles serialization to protobuf for the API and to JSON (via that protobuf) for storage in settings.

Definition at line 42 of file erc_exclusion.h.

Constructor & Destructor Documentation

◆ ERC_EXCLUSION() [1/2]

ERC_EXCLUSION::ERC_EXCLUSION ( )

◆ ERC_EXCLUSION() [2/2]

ERC_EXCLUSION::ERC_EXCLUSION ( const ERC_EXCLUSION & aOther)

Definition at line 67 of file erc_exclusion.cpp.

References ERC_EXCLUSION(), and m_impl.

◆ ~ERC_EXCLUSION()

ERC_EXCLUSION::~ERC_EXCLUSION ( )
default

References ERC_EXCLUSION().

Member Function Documentation

◆ FromLegacyStrings()

◆ FromMarker()

◆ FromProto()

ERC_EXCLUSION ERC_EXCLUSION::FromProto ( const kiapi::schematic::ErcExclusion & aMessage)
static

Definition at line 96 of file erc_exclusion.cpp.

References canonicalizeExclusion(), ERC_EXCLUSION(), and m_impl.

◆ GetComment()

wxString ERC_EXCLUSION::GetComment ( ) const

Definition at line 211 of file erc_exclusion.cpp.

References m_impl.

Referenced by SCHEMATIC::ResolveERCExclusions().

◆ GetSortKey()

std::string ERC_EXCLUSION::GetSortKey ( ) const

◆ operator=()

ERC_EXCLUSION & ERC_EXCLUSION::operator= ( const ERC_EXCLUSION & aOther)

Definition at line 72 of file erc_exclusion.cpp.

References ERC_EXCLUSION(), and m_impl.

◆ SetComment()

void ERC_EXCLUSION::SetComment ( const wxString & aComment)

Definition at line 217 of file erc_exclusion.cpp.

References m_impl.

Referenced by FromLegacyStrings(), FromMarker(), and SCHEMATIC::ResolveERCExclusions().

◆ ToProto()

const kiapi::schematic::ErcExclusion & ERC_EXCLUSION::ToProto ( ) const

Friends And Related Symbol Documentation

◆ from_json

void from_json ( const nlohmann::json & aJson,
ERC_EXCLUSION & aEx )
friend

Definition at line 195 of file erc_exclusion.cpp.

References canonicalizeExclusion(), ERC_EXCLUSION(), and m_impl.

◆ operator!=

bool operator!= ( const ERC_EXCLUSION & a,
const ERC_EXCLUSION & b )
friend

Definition at line 66 of file erc_exclusion.h.

References ERC_EXCLUSION().

◆ operator==

bool operator== ( const ERC_EXCLUSION & a,
const ERC_EXCLUSION & b )
friend

Definition at line 61 of file erc_exclusion.h.

References ERC_EXCLUSION(), and GetSortKey().

◆ to_json

void to_json ( nlohmann::json & aJson,
const ERC_EXCLUSION & aEx )
friend

Definition at line 176 of file erc_exclusion.cpp.

References ERC_EXCLUSION(), and m_impl.

Member Data Documentation

◆ m_impl

std::unique_ptr<IMPL> ERC_EXCLUSION::m_impl
private

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