LibrePCB Developers Documentation
ComponentSignal Class Referencefinal

The ComponentSignal class represents one signal of a component. More...

#include <componentsignal.h>

+ Inheritance diagram for ComponentSignal:
+ Collaboration diagram for ComponentSignal:

Public Types

enum  Event
 
typedef Slot< ComponentSignal, EventOnEditedSlot
 

Public Member Functions

 ComponentSignal ()=delete
 
 ComponentSignal (const ComponentSignal &other) noexcept
 
 ComponentSignal (const Uuid &uuid, const CircuitIdentifier &name, const SignalRole &role, const QString &forcedNetName, bool isRequired, bool isNegated, bool isClock) noexcept
 
 ComponentSignal (const SExpression &node)
 
 ~ComponentSignal () noexcept
 
const UuidgetUuid () const noexcept
 
const CircuitIdentifiergetName () const noexcept
 
const SignalRolegetRole () const noexcept
 
const QString & getForcedNetName () const noexcept
 
bool isRequired () const noexcept
 
bool isNegated () const noexcept
 
bool isClock () const noexcept
 
bool isNetSignalNameForced () const noexcept
 
bool setName (const CircuitIdentifier &name) noexcept
 
bool setRole (const SignalRole &role) noexcept
 
bool setForcedNetName (const QString &name) noexcept
 
bool setIsRequired (bool required) noexcept
 
bool setIsNegated (bool negated) noexcept
 
bool setIsClock (bool clock) noexcept
 
void serialize (SExpression &root) const override
 Serialize the object into an existing S-Expression node. More...
 
bool operator== (const ComponentSignal &rhs) const noexcept
 
bool operator!= (const ComponentSignal &rhs) const noexcept
 
ComponentSignaloperator= (const ComponentSignal &rhs) noexcept
 
- Public Member Functions inherited from SerializableObject
 SerializableObject () noexcept
 
virtual ~SerializableObject () noexcept
 
SExpression serializeToDomElement (const QString &name) const
 Serialize the object to a new S-Expression node. More...
 

Public Attributes

Signal< ComponentSignal, EventonEdited
 

Private Attributes

Uuid mUuid
 
CircuitIdentifier mName
 
SignalRole mRole
 
QString mForcedNetName
 
bool mIsRequired
 
bool mIsNegated
 
bool mIsClock
 

Additional Inherited Members

- Static Public Member Functions inherited from SerializableObject
template<typename T >
static void serializeObjectContainer (SExpression &root, const T &container, const QString &itemName)
 
template<typename T >
static void serializePointerContainer (SExpression &root, const T &container, const QString &itemName)
 
template<typename T >
static void serializePointerContainerUuidSorted (SExpression &root, const T &container, const QString &itemName)
 

Detailed Description

The ComponentSignal class represents one signal of a component.

Member Typedef Documentation

◆ OnEditedSlot

Member Enumeration Documentation

◆ Event

enum Event
strong
Enumerator
UuidChanged 
NameChanged 
RoleChanged 
ForcedNetNameChanged 
IsRequiredChanged 
IsNegatedChanged 
IsClockChanged 

Constructor & Destructor Documentation

◆ ComponentSignal() [1/4]

ComponentSignal ( )
delete

◆ ComponentSignal() [2/4]

ComponentSignal ( const ComponentSignal other)
noexcept

◆ ComponentSignal() [3/4]

ComponentSignal ( const Uuid uuid,
const CircuitIdentifier name,
const SignalRole role,
const QString &  forcedNetName,
bool  isRequired,
bool  isNegated,
bool  isClock 
)
noexcept

◆ ComponentSignal() [4/4]

ComponentSignal ( const SExpression node)
explicit

◆ ~ComponentSignal()

~ComponentSignal ( )
noexcept

Member Function Documentation

◆ getUuid()

const Uuid& getUuid ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getName()

const CircuitIdentifier& getName ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getRole()

const SignalRole& getRole ( ) const
inlinenoexcept

◆ getForcedNetName()

const QString& getForcedNetName ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ isRequired()

bool isRequired ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ isNegated()

bool isNegated ( ) const
inlinenoexcept

◆ isClock()

bool isClock ( ) const
inlinenoexcept

◆ isNetSignalNameForced()

bool isNetSignalNameForced ( ) const
inlinenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setName()

bool setName ( const CircuitIdentifier name)
noexcept
+ Here is the caller graph for this function:

◆ setRole()

bool setRole ( const SignalRole role)
noexcept
+ Here is the caller graph for this function:

◆ setForcedNetName()

bool setForcedNetName ( const QString &  name)
noexcept
+ Here is the caller graph for this function:

◆ setIsRequired()

bool setIsRequired ( bool  required)
noexcept
+ Here is the caller graph for this function:

◆ setIsNegated()

bool setIsNegated ( bool  negated)
noexcept
+ Here is the caller graph for this function:

◆ setIsClock()

bool setIsClock ( bool  clock)
noexcept
+ Here is the caller graph for this function:

◆ serialize()

void serialize ( SExpression root) const
overridevirtual

Serialize the object into an existing S-Expression node.

This method inserts/appends all attributes and childs of the object to an existing S-Expression node. The content which already exists in the given S-Expression node will not be removed.

Note
The generated S-Expression node has always the format of the application's major version (it's not possible to generate DOMs of older versions).
Parameters
rootThe target DOM root node
Exceptions
ExceptionThis method throws an exception if an error occurs.

Implements SerializableObject.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator==()

bool operator== ( const ComponentSignal rhs) const
noexcept
+ Here is the caller graph for this function:

◆ operator!=()

bool operator!= ( const ComponentSignal rhs) const
inlinenoexcept
+ Here is the call graph for this function:

◆ operator=()

ComponentSignal & operator= ( const ComponentSignal rhs)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ onEdited

◆ mUuid

Uuid mUuid
private

◆ mName

CircuitIdentifier mName
private

◆ mRole

SignalRole mRole
private

◆ mForcedNetName

QString mForcedNetName
private

◆ mIsRequired

bool mIsRequired
private

◆ mIsNegated

bool mIsNegated
private

◆ mIsClock

bool mIsClock
private

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