SILICON
Loading...
Searching...
No Matches
WireManager::Edit Class Reference

#include <wireManager.hpp>

Collaboration diagram for WireManager::Edit:

Public Member Functions

 Edit (WireManager &manager, GraphicalWireSegment *segment)
 Captures a registered segment's original local route for a preview edit.
 ~Edit () noexcept
 Cancels an uncommitted edit and suppresses exceptions during cleanup.
 Edit (const Edit &)=delete
 Disables copying of an edit that owns route restoration.
Edit & operator= (const Edit &)=delete
 Disables copy assignment of a route edit.
void commit ()
 Validates the preview route and queues its topology rebuild.
void cancel ()
 Restores the original local route if the segment is still registered.

Private Attributes

WireManager * manager
uint64_t segmentId
std::vector< QPointF > originalPoints

Detailed Description

A preview edit commits topology once, or restores its original route on cancel.

Definition at line 118 of file wireManager.hpp.

Constructor & Destructor Documentation

◆ Edit() [1/2]

Edit ( WireManager & manager,
GraphicalWireSegment * segment )

Captures a registered segment's original local route for a preview edit.

Parameters
managerManager owning the segment.
segmentNon-null registered segment whose route will be edited.

Definition at line 41 of file wireManager.cpp.

◆ ~Edit()

~Edit ( )
noexcept

Cancels an uncommitted edit and suppresses exceptions during cleanup.

Definition at line 45 of file wireManager.cpp.

◆ Edit() [2/2]

Edit ( const Edit & )
delete

Disables copying of an edit that owns route restoration.

Member Function Documentation

◆ cancel()

void cancel ( )

Restores the original local route if the segment is still registered.

Definition at line 50 of file wireManager.cpp.

◆ commit()

void commit ( )

Validates the preview route and queues its topology rebuild.

Exceptions
std::invalid_argumentIf the route is not orthogonal and simple or has fewer than two points.
Note
Invalid routes are restored; an enclosing batch defers topology reconstruction.

Definition at line 59 of file wireManager.cpp.

◆ operator=()

Edit & operator= ( const Edit & )
delete

Disables copy assignment of a route edit.

Member Data Documentation

◆ manager

WireManager* manager
private

Definition at line 142 of file wireManager.hpp.

◆ originalPoints

std::vector<QPointF> originalPoints
private

Definition at line 144 of file wireManager.hpp.

◆ segmentId

uint64_t segmentId
private

Definition at line 143 of file wireManager.hpp.


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