KiCad PCB EDA Suite
Loading...
Searching...
No Matches
OUTSET_ROUTINE Class Reference

#include <item_modification_routine.h>

Inheritance diagram for OUTSET_ROUTINE:
ITEM_MODIFICATION_ROUTINE

Classes

struct  PARAMETERS
 

Public Member Functions

 OUTSET_ROUTINE (BOARD_ITEM *aBoard, CHANGE_HANDLER &aHandler, const PARAMETERS &aParams)
 
wxString GetCommitDescription () const override
 
std::optional< wxString > GetStatusMessage () const
 
void ProcessItem (BOARD_ITEM &aItem)
 
unsigned GetSuccesses () const
 
unsigned GetFailures () const
 

Protected Member Functions

BOARD_ITEMGetBoard () const
 The BOARD used when creating new shapes.
 
void AddSuccess ()
 Mark that one of the actions succeeded.
 
void AddFailure ()
 Mark that one of the actions failed.
 
bool ModifyLineOrDeleteIfZeroLength (PCB_SHAPE &aItem, const std::optional< SEG > &aSeg)
 Helper function useful for multiple tools: modify a line or delete it if it has zero length.
 
CHANGE_HANDLERGetHandler ()
 Access the handler for making changes to the board.
 

Private Attributes

const PARAMETERS m_params
 
BOARD_ITEMm_board
 
CHANGE_HANDLERm_handler
 
unsigned m_numSuccesses
 
unsigned m_numFailures
 

Detailed Description

Definition at line 439 of file item_modification_routine.h.

Constructor & Destructor Documentation

◆ OUTSET_ROUTINE()

OUTSET_ROUTINE::OUTSET_ROUTINE ( BOARD_ITEM * aBoard,
CHANGE_HANDLER & aHandler,
const PARAMETERS & aParams )
inline

Member Function Documentation

◆ AddFailure()

void ITEM_MODIFICATION_ROUTINE::AddFailure ( )
inlineprotectedinherited

◆ AddSuccess()

void ITEM_MODIFICATION_ROUTINE::AddSuccess ( )
inlineprotectedinherited

◆ GetBoard()

◆ GetCommitDescription()

wxString OUTSET_ROUTINE::GetCommitDescription ( ) const
overridevirtual

Implements ITEM_MODIFICATION_ROUTINE.

Definition at line 741 of file item_modification_routine.cpp.

References _.

Referenced by CONVERT_TOOL::OutsetItems().

◆ GetFailures()

◆ GetHandler()

◆ GetStatusMessage()

std::optional< wxString > OUTSET_ROUTINE::GetStatusMessage ( ) const

◆ GetSuccesses()

◆ ModifyLineOrDeleteIfZeroLength()

bool ITEM_MODIFICATION_ROUTINE::ModifyLineOrDeleteIfZeroLength ( PCB_SHAPE & aItem,
const std::optional< SEG > & aSeg )
protectedinherited

Helper function useful for multiple tools: modify a line or delete it if it has zero length.

Parameters
aItemthe line to modify
aSegthe new line geometry

Definition at line 81 of file item_modification_routine.cpp.

References ITEM_MODIFICATION_ROUTINE::CHANGE_HANDLER::DeleteItem(), GetHandler(), EDA_SHAPE::GetShape(), ITEM_MODIFICATION_ROUTINE::CHANGE_HANDLER::MarkItemModified(), SEGMENT, EDA_SHAPE::SetEnd(), and EDA_SHAPE::SetStart().

Referenced by DOGBONE_CORNER_ROUTINE::ProcessLinePair(), LINE_CHAMFER_ROUTINE::ProcessLinePair(), and LINE_FILLET_ROUTINE::ProcessLinePair().

◆ ProcessItem()

Member Data Documentation

◆ m_board

BOARD_ITEM* ITEM_MODIFICATION_ROUTINE::m_board
privateinherited

Definition at line 202 of file item_modification_routine.h.

Referenced by GetBoard(), and ITEM_MODIFICATION_ROUTINE().

◆ m_handler

CHANGE_HANDLER& ITEM_MODIFICATION_ROUTINE::m_handler
privateinherited

Definition at line 203 of file item_modification_routine.h.

Referenced by GetHandler(), and ITEM_MODIFICATION_ROUTINE().

◆ m_numFailures

unsigned ITEM_MODIFICATION_ROUTINE::m_numFailures
privateinherited

Definition at line 206 of file item_modification_routine.h.

Referenced by AddFailure(), GetFailures(), and ITEM_MODIFICATION_ROUTINE().

◆ m_numSuccesses

unsigned ITEM_MODIFICATION_ROUTINE::m_numSuccesses
privateinherited

◆ m_params

const PARAMETERS OUTSET_ROUTINE::m_params
private

Definition at line 467 of file item_modification_routine.h.

Referenced by OUTSET_ROUTINE(), and ProcessItem().


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