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

The NetClass class. More...

#include <netclass.h>

+ Inheritance diagram for NetClass:
+ Collaboration diagram for NetClass:

Public Member Functions

 NetClass ()=delete
 
 NetClass (const NetClass &other)=delete
 
 NetClass (Circuit &circuit, const SExpression &node)
 
 NetClass (Circuit &circuit, const ElementName &name)
 
 ~NetClass () noexcept
 
CircuitgetCircuit () const noexcept
 
const UuidgetUuid () const noexcept
 
const ElementNamegetName () const noexcept
 
int getNetSignalCount () const noexcept
 
bool isUsed () const noexcept
 
void setName (const ElementName &name) noexcept
 
void addToCircuit ()
 
void removeFromCircuit ()
 
void registerNetSignal (NetSignal &signal)
 
void unregisterNetSignal (NetSignal &signal)
 
void serialize (SExpression &root) const override
 Serialize the object into an existing S-Expression node. More...
 
NetClassoperator= (const NetClass &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 Member Functions

void updateErcMessages () noexcept
 

Private Attributes

CircuitmCircuit
 
bool mIsAddedToCircuit
 
Uuid mUuid
 
ElementName mName
 
QHash< Uuid, NetSignal * > mRegisteredNetSignals
 all registered netsignals More...
 
QScopedPointer< ErcMsgmErcMsgUnusedNetClass
 the ERC message for unused netclasses 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 NetClass class.

Constructor & Destructor Documentation

NetClass ( )
delete
NetClass ( const NetClass other)
delete
NetClass ( Circuit circuit,
const SExpression node 
)
explicit
NetClass ( Circuit circuit,
const ElementName name 
)
explicit
~NetClass ( )
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 Uuid& getUuid ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const ElementName& getName ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

int getNetSignalCount ( ) const
inlinenoexcept

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

void setName ( const ElementName name)
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 registerNetSignal ( NetSignal signal)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void unregisterNetSignal ( NetSignal signal)

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

NetClass& operator= ( const NetClass rhs)
delete
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
Uuid mUuid
private
ElementName mName
private
QHash<Uuid, NetSignal*> mRegisteredNetSignals
private

all registered netsignals

QScopedPointer<ErcMsg> mErcMsgUnusedNetClass
private

the ERC message for unused netclasses


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