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

The NetSignal class. More...

#include <netsignal.h>

+ Inheritance diagram for NetSignal:
+ Collaboration diagram for NetSignal:

Signals

void nameChanged (const CircuitIdentifier &newName)
 
void highlightedChanged (bool isHighlighted)
 

Public Member Functions

 NetSignal ()=delete
 
 NetSignal (const NetSignal &other)=delete
 
 NetSignal (Circuit &circuit, const SExpression &node)
 
 NetSignal (Circuit &circuit, NetClass &netclass, const CircuitIdentifier &name, bool autoName)
 
 ~NetSignal () noexcept
 
const UuidgetUuid () const noexcept
 
const CircuitIdentifiergetName () const noexcept
 
bool hasAutoName () const noexcept
 
NetClassgetNetClass () const noexcept
 
bool isHighlighted () const noexcept
 
CircuitgetCircuit () const noexcept
 
const QList
< ComponentSignalInstance * > & 
getComponentSignals () const noexcept
 
const QList< SI_NetSegment * > & getSchematicNetSegments () const noexcept
 
const QList< BI_NetSegment * > & getBoardNetSegments () const noexcept
 
const QList< BI_Plane * > & getBoardPlanes () const noexcept
 
int getRegisteredElementsCount () const noexcept
 
bool isUsed () const noexcept
 
bool isNameForced () const noexcept
 
bool isAddedToCircuit () const noexcept
 
void setName (const CircuitIdentifier &name, bool isAutoName) noexcept
 
void setHighlighted (bool hl) noexcept
 
void addToCircuit ()
 
void removeFromCircuit ()
 
void registerComponentSignal (ComponentSignalInstance &signal)
 
void unregisterComponentSignal (ComponentSignalInstance &signal)
 
void registerSchematicNetSegment (SI_NetSegment &netsegment)
 
void unregisterSchematicNetSegment (SI_NetSegment &netsegment)
 
void registerBoardNetSegment (BI_NetSegment &netsegment)
 
void unregisterBoardNetSegment (BI_NetSegment &netsegment)
 
void registerBoardPlane (BI_Plane &plane)
 
void unregisterBoardPlane (BI_Plane &plane)
 
void serialize (SExpression &root) const override
 Serialize the object into an existing S-Expression node. More...
 
NetSignaloperator= (const NetSignal &rhs)=delete
 
bool operator== (const NetSignal &rhs) noexcept
 
bool operator!= (const NetSignal &rhs) noexcept
 
- 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 Member Functions

bool checkAttributesValidity () const noexcept
 
void updateErcMessages () noexcept
 

Private Attributes

CircuitmCircuit
 
bool mIsAddedToCircuit
 
bool mIsHighlighted
 
Uuid mUuid
 
CircuitIdentifier mName
 
bool mHasAutoName
 
NetClassmNetClass
 
QList< ComponentSignalInstance * > mRegisteredComponentSignals
 
QList< SI_NetSegment * > mRegisteredSchematicNetSegments
 
QList< BI_NetSegment * > mRegisteredBoardNetSegments
 
QList< BI_Plane * > mRegisteredBoardPlanes
 
QScopedPointer< ErcMsgmErcMsgUnusedNetSignal
 the ERC message for unused netsignals More...
 
QScopedPointer< ErcMsgmErcMsgConnectedToLessThanTwoPins
 the ERC messages for netsignals with less than two component signals 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

The NetSignal class.

Constructor & Destructor Documentation

NetSignal ( )
delete
NetSignal ( const NetSignal other)
delete
NetSignal ( Circuit circuit,
const SExpression node 
)
explicit

+ Here is the call graph for this function:

NetSignal ( Circuit circuit,
NetClass netclass,
const CircuitIdentifier name,
bool  autoName 
)
explicit

+ Here is the call graph for this function:

~NetSignal ( )
noexcept

+ Here is the call graph for this function:

Member Function Documentation

const Uuid& getUuid ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const CircuitIdentifier& getName ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

bool hasAutoName ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

NetClass& getNetClass ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

bool isHighlighted ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

Circuit& getCircuit ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const QList<ComponentSignalInstance*>& getComponentSignals ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const QList<SI_NetSegment*>& getSchematicNetSegments ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const QList<BI_NetSegment*>& getBoardNetSegments ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const QList<BI_Plane*>& getBoardPlanes ( ) 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
noexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool isNameForced ( ) const
noexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool isAddedToCircuit ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

void setName ( const CircuitIdentifier name,
bool  isAutoName 
)
noexcept

+ Here is the caller graph for this function:

void setHighlighted ( bool  hl)
noexcept

+ 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 registerComponentSignal ( ComponentSignalInstance signal)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void unregisterComponentSignal ( ComponentSignalInstance signal)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void registerSchematicNetSegment ( SI_NetSegment netsegment)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void unregisterSchematicNetSegment ( SI_NetSegment netsegment)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void registerBoardNetSegment ( BI_NetSegment netsegment)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void unregisterBoardNetSegment ( BI_NetSegment netsegment)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void registerBoardPlane ( BI_Plane plane)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void unregisterBoardPlane ( BI_Plane plane)

+ Here is the call graph for this function:

+ 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:

NetSignal& operator= ( const NetSignal rhs)
delete
bool operator== ( const NetSignal rhs)
inlinenoexcept
bool operator!= ( const NetSignal rhs)
inlinenoexcept
void nameChanged ( const CircuitIdentifier newName)
signal

+ Here is the caller graph for this function:

void highlightedChanged ( bool  isHighlighted)
signal

+ Here is the caller graph for this function:

bool checkAttributesValidity ( ) const
privatenoexcept

+ Here is the caller graph for this function:

void updateErcMessages ( )
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

Circuit& mCircuit
private
bool mIsAddedToCircuit
private
bool mIsHighlighted
private
Uuid mUuid
private
CircuitIdentifier mName
private
bool mHasAutoName
private
NetClass* mNetClass
private
QList<ComponentSignalInstance*> mRegisteredComponentSignals
private
QList<SI_NetSegment*> mRegisteredSchematicNetSegments
private
QList<BI_NetSegment*> mRegisteredBoardNetSegments
private
QList<BI_Plane*> mRegisteredBoardPlanes
private
QScopedPointer<ErcMsg> mErcMsgUnusedNetSignal
private

the ERC message for unused netsignals

QScopedPointer<ErcMsg> mErcMsgConnectedToLessThanTwoPins
private

the ERC messages for netsignals with less than two component signals


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