KiCad PCB EDA Suite
Loading...
Searching...
No Matches
ITEM_MODIFICATION_ROUTINE::CALLABLE_BASED_HANDLER Class Reference

A handler that is based on a set of callbacks provided by the user of the ITEM_MODIFICATION_ROUTINE. More...

#include <item_modification_routine.h>

Inheritance diagram for ITEM_MODIFICATION_ROUTINE::CALLABLE_BASED_HANDLER:
ITEM_MODIFICATION_ROUTINE::CHANGE_HANDLER

Public Types

using CREATION_HANDLER = std::function< void(std::unique_ptr< PCB_SHAPE >)>
 Handler for creating a new item on the board.
 
using MODIFICATION_HANDLER = std::function< void(PCB_SHAPE &)>
 Handler for modifying or deleting an existing item on the board.
 
using DELETION_HANDLER = std::function< void(PCB_SHAPE &)>
 Handler for modifying or deleting an existing item on the board.
 

Public Member Functions

 CALLABLE_BASED_HANDLER (CREATION_HANDLER aCreationHandler, MODIFICATION_HANDLER aModificationHandler, DELETION_HANDLER aDeletionHandler)
 
void AddNewItem (std::unique_ptr< PCB_SHAPE > aItem) override
 Report that the tools wants to add a new item to the board.
 
void MarkItemModified (PCB_SHAPE &aItem) override
 Report that the tool has modified an item on the board.
 
void DeleteItem (PCB_SHAPE &aItem) override
 Report that the tool has deleted an item on the board.
 

Public Attributes

CREATION_HANDLER m_creationHandler
 
MODIFICATION_HANDLER m_modificationHandler
 
DELETION_HANDLER m_deletionHandler
 

Detailed Description

A handler that is based on a set of callbacks provided by the user of the ITEM_MODIFICATION_ROUTINE.

Definition at line 93 of file item_modification_routine.h.

Member Typedef Documentation

◆ CREATION_HANDLER

using ITEM_MODIFICATION_ROUTINE::CALLABLE_BASED_HANDLER::CREATION_HANDLER = std::function<void( std::unique_ptr<PCB_SHAPE> )>

Handler for creating a new item on the board.

Parameters
PCB_SHAPE&the shape to add

Definition at line 101 of file item_modification_routine.h.

◆ DELETION_HANDLER

Handler for modifying or deleting an existing item on the board.

Parameters
PCB_SHAPE&the shape to delete

Definition at line 115 of file item_modification_routine.h.

◆ MODIFICATION_HANDLER

Handler for modifying or deleting an existing item on the board.

Parameters
PCB_SHAPE&the shape to modify

Definition at line 108 of file item_modification_routine.h.

Constructor & Destructor Documentation

◆ CALLABLE_BASED_HANDLER()

ITEM_MODIFICATION_ROUTINE::CALLABLE_BASED_HANDLER::CALLABLE_BASED_HANDLER ( CREATION_HANDLER  aCreationHandler,
MODIFICATION_HANDLER  aModificationHandler,
DELETION_HANDLER  aDeletionHandler 
)
inline

Definition at line 117 of file item_modification_routine.h.

Member Function Documentation

◆ AddNewItem()

void ITEM_MODIFICATION_ROUTINE::CALLABLE_BASED_HANDLER::AddNewItem ( std::unique_ptr< PCB_SHAPE aItem)
inlineoverridevirtual

Report that the tools wants to add a new item to the board.

Parameters
aItemthe new item

Implements ITEM_MODIFICATION_ROUTINE::CHANGE_HANDLER.

Definition at line 131 of file item_modification_routine.h.

References m_creationHandler.

◆ DeleteItem()

void ITEM_MODIFICATION_ROUTINE::CALLABLE_BASED_HANDLER::DeleteItem ( PCB_SHAPE aItem)
inlineoverridevirtual

Report that the tool has deleted an item on the board.

Parameters
aItemthe deleted item

Implements ITEM_MODIFICATION_ROUTINE::CHANGE_HANDLER.

Definition at line 148 of file item_modification_routine.h.

References m_deletionHandler.

◆ MarkItemModified()

void ITEM_MODIFICATION_ROUTINE::CALLABLE_BASED_HANDLER::MarkItemModified ( PCB_SHAPE aItem)
inlineoverridevirtual

Report that the tool has modified an item on the board.

Parameters
aItemthe modified item

Implements ITEM_MODIFICATION_ROUTINE::CHANGE_HANDLER.

Definition at line 141 of file item_modification_routine.h.

References m_modificationHandler.

Member Data Documentation

◆ m_creationHandler

CREATION_HANDLER ITEM_MODIFICATION_ROUTINE::CALLABLE_BASED_HANDLER::m_creationHandler

Definition at line 150 of file item_modification_routine.h.

Referenced by AddNewItem().

◆ m_deletionHandler

DELETION_HANDLER ITEM_MODIFICATION_ROUTINE::CALLABLE_BASED_HANDLER::m_deletionHandler

Definition at line 152 of file item_modification_routine.h.

Referenced by DeleteItem().

◆ m_modificationHandler

MODIFICATION_HANDLER ITEM_MODIFICATION_ROUTINE::CALLABLE_BASED_HANDLER::m_modificationHandler

Definition at line 151 of file item_modification_routine.h.

Referenced by MarkItemModified().


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