LibrePCB Developers Documentation
Junction Class Referencefinal

The Junction class represents the connection point between netlines or traces. More...

#include <junction.h>

+ Inheritance diagram for Junction:
+ Collaboration diagram for Junction:

Public Types

enum  Event
 
typedef Slot< Junction, EventOnEditedSlot
 

Public Member Functions

 Junction ()=delete
 
 Junction (const Junction &other) noexcept
 
 Junction (const Uuid &uuid, const Junction &other) noexcept
 
 Junction (const Uuid &uuid, const Point &position) noexcept
 
 Junction (const SExpression &node, const Version &fileFormat)
 
 ~Junction () noexcept
 
const UuidgetUuid () const noexcept
 
const PointgetPosition () const noexcept
 
bool setUuid (const Uuid &uuid) noexcept
 
bool setPosition (const Point &position) noexcept
 
void serialize (SExpression &root) const override
 Serialize the object into an existing S-Expression node. More...
 
bool operator== (const Junction &rhs) const noexcept
 
bool operator!= (const Junction &rhs) const noexcept
 
Junctionoperator= (const Junction &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< Junction, EventonEdited
 

Private Attributes

Uuid mUuid
 
Point mPosition
 

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 Junction class represents the connection point between netlines or traces.

The main purpose of this class is to serialize and deserialize junctions contained in schematics or boards.

Member Typedef Documentation

◆ OnEditedSlot

Member Enumeration Documentation

◆ Event

enum Event
strong
Enumerator
UuidChanged 
PositionChanged 

Constructor & Destructor Documentation

◆ Junction() [1/5]

Junction ( )
delete

◆ Junction() [2/5]

Junction ( const Junction other)
noexcept

◆ Junction() [3/5]

Junction ( const Uuid uuid,
const Junction other 
)
noexcept

◆ Junction() [4/5]

Junction ( const Uuid uuid,
const Point position 
)
noexcept

◆ Junction() [5/5]

Junction ( const SExpression node,
const Version fileFormat 
)

◆ ~Junction()

~Junction ( )
noexcept

Member Function Documentation

◆ getUuid()

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

◆ getPosition()

const Point& getPosition ( ) const
inlinenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setUuid()

bool setUuid ( const Uuid uuid)
noexcept
+ Here is the caller graph for this function:

◆ setPosition()

bool setPosition ( const Point position)
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 Junction rhs) const
noexcept
+ Here is the caller graph for this function:

◆ operator!=()

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

◆ operator=()

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

Member Data Documentation

◆ onEdited

Signal<Junction, Event> onEdited

◆ mUuid

Uuid mUuid
private

◆ mPosition

Point mPosition
private

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