LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ComponentSignalInstance Class Referencefinal

The ComponentSignalInstance class. More...

#include <componentsignalinstance.h>

+ Inheritance diagram for ComponentSignalInstance:
+ Collaboration diagram for ComponentSignalInstance:

Signals

void netSignalChanged (NetSignal *from, NetSignal *to)
 

Public Member Functions

 ComponentSignalInstance ()=delete
 
 ComponentSignalInstance (const ComponentSignalInstance &other)=delete
 
 ComponentSignalInstance (Circuit &circuit, ComponentInstance &cmpInstance, const SExpression &node)
 
 ComponentSignalInstance (Circuit &circuit, ComponentInstance &cmpInstance, const library::ComponentSignal &cmpSignal, NetSignal *netsignal=nullptr)
 
 ~ComponentSignalInstance () noexcept
 
CircuitgetCircuit () const noexcept
 
const library::ComponentSignalgetCompSignal () const noexcept
 
NetSignalgetNetSignal () const noexcept
 
bool isNetSignalNameForced () const noexcept
 
QString getForcedNetSignalName () const noexcept
 
const QList< SI_SymbolPin * > & getRegisteredSymbolPins () const noexcept
 
const QList< BI_FootprintPad * > & getRegisteredFootprintPads () const noexcept
 
int getRegisteredElementsCount () const noexcept
 
bool isUsed () const noexcept
 
bool arePinsOrPadsUsed () const noexcept
 
void setNetSignal (NetSignal *netsignal)
 (Re-)Connect/Disconnect this component signal to/from a circuit's netsignal More...
 
void addToCircuit ()
 
void removeFromCircuit ()
 
void registerSymbolPin (SI_SymbolPin &pin)
 
void unregisterSymbolPin (SI_SymbolPin &pin)
 
void registerFootprintPad (BI_FootprintPad &pad)
 
void unregisterFootprintPad (BI_FootprintPad &pad)
 
void serialize (SExpression &root) const override
 Serialize the object into an existing S-Expression node. More...
 
ComponentSignalInstanceoperator= (const ComponentSignalInstance &rhs)=delete
 
- Public Member Functions inherited from IF_ErcMsgProvider
 IF_ErcMsgProvider ()
 
virtual ~IF_ErcMsgProvider ()
 
virtual const char * getErcMsgOwnerClassName () const noexcept=0
 
- 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...
 

Private Slots

void netSignalNameChanged (const CircuitIdentifier &newName) noexcept
 
void updateErcMessages () noexcept
 

Private Member Functions

void init ()
 
bool checkAttributesValidity () const noexcept
 

Private Attributes

CircuitmCircuit
 
ComponentInstancemComponentInstance
 
const library::ComponentSignalmComponentSignal
 
bool mIsAddedToCircuit
 
NetSignalmNetSignal
 
QList< SI_SymbolPin * > mRegisteredSymbolPins
 
QList< BI_FootprintPad * > mRegisteredFootprintPads
 
QScopedPointer< ErcMsgmErcMsgUnconnectedRequiredSignal
 The ERC message for an unconnected required component signal. More...
 
QScopedPointer< ErcMsgmErcMsgForcedNetSignalNameConflict
 The ERC message for a global net signal name mismatch. More...
 

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

Constructor & Destructor Documentation

ComponentSignalInstance ( Circuit circuit,
ComponentInstance cmpInstance,
const SExpression node 
)
explicit

+ Here is the call graph for this function:

ComponentSignalInstance ( Circuit circuit,
ComponentInstance cmpInstance,
const library::ComponentSignal cmpSignal,
NetSignal netsignal = nullptr 
)
explicit

+ Here is the call graph for this function:

~ComponentSignalInstance ( )
noexcept

+ Here is the call graph for this function:

Member Function Documentation

Circuit& getCircuit ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const library::ComponentSignal& getCompSignal ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

NetSignal* getNetSignal ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

bool isNetSignalNameForced ( ) const
noexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

QString getForcedNetSignalName ( ) const
noexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const QList<SI_SymbolPin*>& getRegisteredSymbolPins ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const QList<BI_FootprintPad*>& getRegisteredFootprintPads ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

int getRegisteredElementsCount ( ) const
noexcept

+ Here is the caller graph for this function:

bool isUsed ( ) const
inlinenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool arePinsOrPadsUsed ( ) const
noexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void setNetSignal ( NetSignal netsignal)

(Re-)Connect/Disconnect this component signal to/from a circuit's netsignal

Warning
This method must always be called from inside an UndoCommand!
Parameters
netsignal- (Re-)Connect: A Pointer to the new netsignal
  • Disconnect: 0
Exceptions
ExceptionThis method throws an exception in case of an error

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void addToCircuit ( )

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void removeFromCircuit ( )

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void registerSymbolPin ( SI_SymbolPin pin)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void unregisterSymbolPin ( SI_SymbolPin pin)

+ Here is the caller graph for this function:

void registerFootprintPad ( BI_FootprintPad pad)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void unregisterFootprintPad ( BI_FootprintPad pad)

+ Here is the caller graph for this function:

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:

ComponentSignalInstance& operator= ( const ComponentSignalInstance rhs)
delete
void netSignalChanged ( NetSignal from,
NetSignal to 
)
signal

+ Here is the caller graph for this function:

void netSignalNameChanged ( const CircuitIdentifier newName)
privateslotnoexcept

+ Here is the caller graph for this function:

void updateErcMessages ( )
privateslotnoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void init ( )
private

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool checkAttributesValidity ( ) const
privatenoexcept

+ Here is the caller graph for this function:

Member Data Documentation

Circuit& mCircuit
private
ComponentInstance& mComponentInstance
private
const library::ComponentSignal* mComponentSignal
private
bool mIsAddedToCircuit
private
NetSignal* mNetSignal
private
QList<SI_SymbolPin*> mRegisteredSymbolPins
private
QList<BI_FootprintPad*> mRegisteredFootprintPads
private
QScopedPointer<ErcMsg> mErcMsgUnconnectedRequiredSignal
private

The ERC message for an unconnected required component signal.

QScopedPointer<ErcMsg> mErcMsgForcedNetSignalNameConflict
private

The ERC message for a global net signal name mismatch.


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