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

The Trace class represents a trace within a board. More...

#include <trace.h>

+ Collaboration diagram for Trace:

Public Types

enum class  Event
 
typedef Slot< Trace, EventOnEditedSlot
 

Public Member Functions

 Trace ()=delete
 
 Trace (const Trace &other) noexcept
 
 Trace (const Uuid &uuid, const Trace &other) noexcept
 
 Trace (const Uuid &uuid, const Layer &layer, const PositiveLength &width, const TraceAnchor &start, const TraceAnchor &end) noexcept
 
 Trace (const SExpression &node)
 
 ~Trace () noexcept
 
const UuidgetUuid () const noexcept
 
const LayergetLayer () const noexcept
 
const PositiveLengthgetWidth () const noexcept
 
const TraceAnchorgetStartPoint () const noexcept
 
const TraceAnchorgetEndPoint () const noexcept
 
bool setUuid (const Uuid &uuid) noexcept
 
bool setLayer (const Layer &layer) noexcept
 
bool setWidth (const PositiveLength &width) noexcept
 
bool setStartPoint (const TraceAnchor &start) noexcept
 
bool setEndPoint (const TraceAnchor &end) noexcept
 
void serialize (SExpression &root) const
 Serialize into librepcb::SExpression node.
 
bool operator== (const Trace &rhs) const noexcept
 
bool operator!= (const Trace &rhs) const noexcept
 
Traceoperator= (const Trace &rhs) noexcept
 

Public Attributes

Signal< Trace, EventonEdited
 

Private Attributes

Uuid mUuid
 
const LayermLayer
 
PositiveLength mWidth
 
TraceAnchor mStart
 
TraceAnchor mEnd
 

Detailed Description

The Trace class represents a trace within a board.

The main purpose of this class is to serialize and deserialize traces.

Member Typedef Documentation

◆ OnEditedSlot

Member Enumeration Documentation

◆ Event

enum class Event
strong
Enumerator
UuidChanged 
LayerChanged 
WidthChanged 
StartPointChanged 
EndPointChanged 

Constructor & Destructor Documentation

◆ Trace() [1/5]

Trace ( )
delete

◆ Trace() [2/5]

Trace ( const Trace other)
noexcept

◆ Trace() [3/5]

Trace ( const Uuid uuid,
const Trace other 
)
noexcept

◆ Trace() [4/5]

Trace ( const Uuid uuid,
const Layer layer,
const PositiveLength width,
const TraceAnchor start,
const TraceAnchor end 
)
noexcept

◆ Trace() [5/5]

Trace ( const SExpression node)
explicit

◆ ~Trace()

~Trace ( )
noexcept

Member Function Documentation

◆ getUuid()

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

◆ getLayer()

const Layer & getLayer ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getWidth()

const PositiveLength & getWidth ( ) const
inlinenoexcept

◆ getStartPoint()

const TraceAnchor & getStartPoint ( ) const
inlinenoexcept

◆ getEndPoint()

const TraceAnchor & getEndPoint ( ) const
inlinenoexcept

◆ setUuid()

bool setUuid ( const Uuid uuid)
noexcept

◆ setLayer()

bool setLayer ( const Layer layer)
noexcept
+ Here is the caller graph for this function:

◆ setWidth()

bool setWidth ( const PositiveLength width)
noexcept

◆ setStartPoint()

bool setStartPoint ( const TraceAnchor start)
noexcept

◆ setEndPoint()

bool setEndPoint ( const TraceAnchor end)
noexcept

◆ 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==()

bool operator== ( const Trace rhs) const
noexcept

◆ operator!=()

bool operator!= ( const Trace rhs) const
inlinenoexcept

◆ operator=()

Trace & operator= ( const Trace rhs)
noexcept

Member Data Documentation

◆ onEdited

Signal<Trace, Event> onEdited

◆ mUuid

Uuid mUuid
private

◆ mLayer

const Layer* mLayer
private

◆ mWidth

PositiveLength mWidth
private

◆ mStart

TraceAnchor mStart
private

◆ mEnd

TraceAnchor mEnd
private

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