LibrePCB Developers Documentation
Loading...
Searching...
No Matches
ErcMsgBase Class Reference

Base class for all ERC messages. More...

#include <electricalrulecheckmessages.h>

+ Inheritance diagram for ErcMsgBase:
+ Collaboration diagram for ErcMsgBase:

Public Member Functions

 ErcMsgBase ()=delete
 
 ErcMsgBase (Severity severity, const QString &msg, const QString &description, const QString &approvalName) noexcept
 
 ErcMsgBase (const ErcMsgBase &other) noexcept
 
virtual ~ErcMsgBase () noexcept
 
const std::optional< Uuid > & getSchematic () const noexcept
 
- Public Member Functions inherited from RuleCheckMessage
 RuleCheckMessage ()=delete
 
Severity getSeverity () const noexcept
 
QString getSeverityTr () const noexcept
 
const QIcon & getSeverityIcon () const noexcept
 
const QString & getMessage () const noexcept
 
const QString & getDescription () const noexcept
 
const SExpressiongetApproval () const noexcept
 
const QVector< Path > & getLocations () const noexcept
 
template<typename T >
T * as () noexcept
 
template<typename T >
const T * as () const noexcept
 
bool operator== (const RuleCheckMessage &rhs) const noexcept
 
bool operator!= (const RuleCheckMessage &rhs) const noexcept
 

Protected Member Functions

bool setLocation (const NetSignal &net) noexcept
 
bool setLocation (const ComponentInstance &component) noexcept
 
bool setLocation (const ComponentSignalInstance &signal) noexcept
 
void setLocation (const SI_Symbol &symbol) noexcept
 
void setLocation (const SI_SymbolPin &pin) noexcept
 
bool setLocation (const SI_NetSegment &segment) noexcept
 
void setLocation (const SI_NetPoint &netPoint) noexcept
 
void setLocation (const SI_NetLine &netLine) noexcept
 
void setLocation (const SI_BusJunction &junction) noexcept
 
- Protected Member Functions inherited from RuleCheckMessage
 RuleCheckMessage (const RuleCheckMessage &other) noexcept
 
 RuleCheckMessage (Severity severity, const QString &msg, const QString &description, const QString &approvalName, const QVector< Path > &locations={}) noexcept
 
virtual ~RuleCheckMessage () noexcept
 

Protected Attributes

std::optional< UuidmSchematic
 
- Protected Attributes inherited from RuleCheckMessage
Severity mSeverity
 
QString mMessage
 
QString mDescription
 
std::unique_ptr< SExpressionmApproval
 
QVector< PathmLocations
 

Additional Inherited Members

- Public Types inherited from RuleCheckMessage
enum class  Severity
 Message severity type (higher number = higher severity) More...
 
- Static Public Member Functions inherited from RuleCheckMessage
static QString getSeverityTr (Severity severity) noexcept
 
static const QIcon & getSeverityIcon (Severity severity) noexcept
 
static QSet< SExpressiongetAllApprovals (const QVector< std::shared_ptr< const RuleCheckMessage > > &messages) noexcept
 

Detailed Description

Base class for all ERC messages.

Provides the functionality for the "go to problem" feature for all ERC messages. Constructors of derived classes can just call one of the setLocation() methods to specify the location of the problem.

Constructor & Destructor Documentation

◆ ErcMsgBase() [1/3]

ErcMsgBase ( )
delete

◆ ErcMsgBase() [2/3]

ErcMsgBase ( Severity  severity,
const QString &  msg,
const QString &  description,
const QString &  approvalName 
)
inlineexplicitnoexcept

◆ ErcMsgBase() [3/3]

ErcMsgBase ( const ErcMsgBase other)
inlinenoexcept

◆ ~ErcMsgBase()

virtual ~ErcMsgBase ( )
inlinevirtualnoexcept

Member Function Documentation

◆ getSchematic()

const std::optional< Uuid > & getSchematic ( ) const
inlinenoexcept

◆ setLocation() [1/9]

bool setLocation ( const NetSignal net)
protectednoexcept

◆ setLocation() [2/9]

bool setLocation ( const ComponentInstance component)
protectednoexcept

◆ setLocation() [3/9]

bool setLocation ( const ComponentSignalInstance signal)
protectednoexcept

◆ setLocation() [4/9]

void setLocation ( const SI_Symbol symbol)
protectednoexcept
+ Here is the call graph for this function:

◆ setLocation() [5/9]

void setLocation ( const SI_SymbolPin pin)
protectednoexcept
+ Here is the call graph for this function:

◆ setLocation() [6/9]

bool setLocation ( const SI_NetSegment segment)
protectednoexcept
+ Here is the call graph for this function:

◆ setLocation() [7/9]

void setLocation ( const SI_NetPoint netPoint)
protectednoexcept
+ Here is the call graph for this function:

◆ setLocation() [8/9]

void setLocation ( const SI_NetLine netLine)
protectednoexcept
+ Here is the call graph for this function:

◆ setLocation() [9/9]

void setLocation ( const SI_BusJunction junction)
protectednoexcept
+ Here is the call graph for this function:

Member Data Documentation

◆ mSchematic

std::optional<Uuid> mSchematic
protected

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