20#ifndef LIBREPCB_CORE_SIGNALROLE_H
21#define LIBREPCB_CORE_SIGNALROLE_H
26#include "../exceptions.h"
70 return mRole == rhs.mRole;
73 return mRole != rhs.mRole;
83 static const QList<SignalRole>&
getAllRoles() noexcept;
87 static SignalRole role(
"passive", tr(
"Passive"));
105 static SignalRole role(
"output", tr(
"Output"));
117 static SignalRole role(
"opendrain", tr(
"Open Drain"));
122 SignalRole(
const QString& role,
const QString& name)
noexcept;
The SignalRole class provides all supported electrical signal roles.
Definition: signalrole.h:42
const QString & getNameTr() const noexcept
Get the name of the SignalRole (human readable and translated)
Definition: signalrole.h:65
static const QList< SignalRole > & getAllRoles() noexcept
Get a list of all available signal roles.
Definition: signalrole.cpp:66
~SignalRole() noexcept
Definition: signalrole.cpp:49
SignalRole & operator=(const SignalRole &rhs) noexcept
Definition: signalrole.cpp:56
static const SignalRole & input() noexcept
Input Pins.
Definition: signalrole.h:98
QString toStr() const noexcept
Serialize this object into a string.
Definition: signalrole.h:58
QString mName
human readable (translated)
Definition: signalrole.h:126
bool operator==(const SignalRole &rhs) const noexcept
Definition: signalrole.h:69
static const SignalRole & output() noexcept
Output Pins.
Definition: signalrole.h:104
bool operator!=(const SignalRole &rhs) const noexcept
Definition: signalrole.h:72
static const SignalRole & passive() noexcept
Passive Pins (R, C, L)
Definition: signalrole.h:86
static const SignalRole & inout() noexcept
Input/Output Pins.
Definition: signalrole.h:110
QString mRole
used for serialization (DO NOT MODIFY VALUES!)
Definition: signalrole.h:125
static const SignalRole & power() noexcept
Power Pins (GND, VCC, VSS,... of Devices)
Definition: signalrole.h:92
static const SignalRole & opendrain() noexcept
Open Collector / Open Drain Pins.
Definition: signalrole.h:116
SignalRole() noexcept
Definition: signalrole.cpp:38
Definition: occmodel.cpp:77