LibrePCB Developers Documentation
Loading...
Searching...
No Matches
SI_BusSegment Class Referencefinal

The SI_BusSegment class. More...

#include <si_bussegment.h>

+ Inheritance diagram for SI_BusSegment:
+ Collaboration diagram for SI_BusSegment:

Signals

void junctionsAndLinesAdded (const QList< SI_BusJunction * > &junctions, const QList< SI_BusLine * > &lines)
 
void junctionsAndLinesRemoved (const QList< SI_BusJunction * > &junctions, const QList< SI_BusLine * > &lines)
 
void labelAdded (SI_BusLabel &label)
 
void labelRemoved (SI_BusLabel &label)
 

Public Member Functions

 SI_BusSegment ()=delete
 
 SI_BusSegment (const SI_BusSegment &other)=delete
 
 SI_BusSegment (Schematic &schematic, const Uuid &uuid, Bus &bus)
 
 ~SI_BusSegment () noexcept
 
const UuidgetUuid () const noexcept
 
BusgetBus () const noexcept
 
bool isUsed () const noexcept
 
Point calcNearestPoint (const Point &p) const noexcept
 
QSet< SI_NetSegment * > getAttachedNetSegments () const noexcept
 
void setBus (Bus &bus)
 
const QMap< Uuid, SI_BusJunction * > & getJunctions () const noexcept
 
const QMap< Uuid, SI_BusLine * > & getLines () const noexcept
 
void addJunctionsAndLines (const QList< SI_BusJunction * > &junctions, const QList< SI_BusLine * > &lines)
 
void removeJunctionsAndLines (const QList< SI_BusJunction * > &junctions, const QList< SI_BusLine * > &lines)
 
const QMap< Uuid, SI_BusLabel * > & getLabels () const noexcept
 
void addLabel (SI_BusLabel &label)
 
void removeLabel (SI_BusLabel &label)
 
void updateAllLabelAnchors () noexcept
 
void addToSchematic () override
 
void removeFromSchematic () override
 
void serialize (SExpression &root) const
 Serialize into librepcb::SExpression node.
 
SI_BusSegmentoperator= (const SI_BusSegment &rhs)=delete
 
bool operator== (const SI_BusSegment &rhs) noexcept
 
bool operator!= (const SI_BusSegment &rhs) noexcept
 
- Public Member Functions inherited from SI_Base
 SI_Base ()=delete
 
 SI_Base (const SI_Base &other)=delete
 
 SI_Base (Schematic &schematic) noexcept
 
virtual ~SI_Base () noexcept
 
ProjectgetProject () const noexcept
 
CircuitgetCircuit () const noexcept
 
SchematicgetSchematic () const noexcept
 
virtual bool isAddedToSchematic () const noexcept
 
SI_Baseoperator= (const SI_Base &rhs)=delete
 

Private Member Functions

bool checkAttributesValidity () const noexcept
 
bool areAllJunctionsConnectedTogether () const noexcept
 
void findAllConnectedJunctions (const SI_BusJunction &np, QSet< const SI_BusJunction * > &points, QSet< const SI_BusLine * > &lines) const noexcept
 

Private Attributes

Uuid mUuid
 
BusmBus
 
QMap< Uuid, SI_BusJunction * > mJunctions
 
QMap< Uuid, SI_BusLine * > mLines
 
QMap< Uuid, SI_BusLabel * > mLabels
 

Additional Inherited Members

- Protected Attributes inherited from SI_Base
SchematicmSchematic
 

Detailed Description

The SI_BusSegment class.

Todo:
Do not allow to create empty bus segments!

Constructor & Destructor Documentation

◆ SI_BusSegment() [1/3]

SI_BusSegment ( )
delete

◆ SI_BusSegment() [2/3]

SI_BusSegment ( const SI_BusSegment other)
delete

◆ SI_BusSegment() [3/3]

SI_BusSegment ( Schematic schematic,
const Uuid uuid,
Bus bus 
)

◆ ~SI_BusSegment()

~SI_BusSegment ( )
noexcept

Member Function Documentation

◆ getUuid()

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

◆ getBus()

Bus & getBus ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ isUsed()

bool isUsed ( ) const
noexcept
+ Here is the caller graph for this function:

◆ calcNearestPoint()

Point calcNearestPoint ( const Point p) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAttachedNetSegments()

QSet< SI_NetSegment * > getAttachedNetSegments ( ) const
noexcept
+ Here is the caller graph for this function:

◆ setBus()

void setBus ( Bus bus)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getJunctions()

const QMap< Uuid, SI_BusJunction * > & getJunctions ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getLines()

const QMap< Uuid, SI_BusLine * > & getLines ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ addJunctionsAndLines()

void addJunctionsAndLines ( const QList< SI_BusJunction * > &  junctions,
const QList< SI_BusLine * > &  lines 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeJunctionsAndLines()

void removeJunctionsAndLines ( const QList< SI_BusJunction * > &  junctions,
const QList< SI_BusLine * > &  lines 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLabels()

const QMap< Uuid, SI_BusLabel * > & getLabels ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ addLabel()

void addLabel ( SI_BusLabel label)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeLabel()

void removeLabel ( SI_BusLabel label)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateAllLabelAnchors()

void updateAllLabelAnchors ( )
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addToSchematic()

void addToSchematic ( )
overridevirtual

Reimplemented from SI_Base.

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

◆ removeFromSchematic()

void removeFromSchematic ( )
overridevirtual

Reimplemented from SI_Base.

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

◆ serialize()

void serialize ( SExpression root) const

Serialize into librepcb::SExpression node.

Parameters
rootRoot node to serialize into.
+ Here is the call graph for this function:

◆ operator=()

SI_BusSegment & operator= ( const SI_BusSegment rhs)
delete

◆ operator==()

bool operator== ( const SI_BusSegment rhs)
inlinenoexcept

◆ operator!=()

bool operator!= ( const SI_BusSegment rhs)
inlinenoexcept

◆ junctionsAndLinesAdded

void junctionsAndLinesAdded ( const QList< SI_BusJunction * > &  junctions,
const QList< SI_BusLine * > &  lines 
)
signal
+ Here is the caller graph for this function:

◆ junctionsAndLinesRemoved

void junctionsAndLinesRemoved ( const QList< SI_BusJunction * > &  junctions,
const QList< SI_BusLine * > &  lines 
)
signal
+ Here is the caller graph for this function:

◆ labelAdded

void labelAdded ( SI_BusLabel label)
signal
+ Here is the caller graph for this function:

◆ labelRemoved

void labelRemoved ( SI_BusLabel label)
signal
+ Here is the caller graph for this function:

◆ checkAttributesValidity()

bool checkAttributesValidity ( ) const
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ areAllJunctionsConnectedTogether()

bool areAllJunctionsConnectedTogether ( ) const
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ findAllConnectedJunctions()

void findAllConnectedJunctions ( const SI_BusJunction np,
QSet< const SI_BusJunction * > &  points,
QSet< const SI_BusLine * > &  lines 
) const
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ mUuid

Uuid mUuid
private

◆ mBus

Bus* mBus
private

◆ mJunctions

QMap<Uuid, SI_BusJunction*> mJunctions
private

◆ mLines

QMap<Uuid, SI_BusLine*> mLines
private

◆ mLabels

QMap<Uuid, SI_BusLabel*> mLabels
private

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