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

Agent for all the modifications while syncing the sheet pin and hierarchical label. More...

#include <sheet_synchronization_agent.h>

Public Types

enum  SHEET_SYNCHRONIZATION_PLACEMENT { PLACE_SHEET_PIN , PLACE_HIERLABEL }
 
using DO_DELETE_ITEM = std::function< void(EDA_ITEM *, SCH_SHEET_PATH)>
 
using MODIFICATION = std::function< void()>
 
using DO_MODIFY_ITEM = std::function< void(EDA_ITEM *, SCH_SHEET_PATH, MODIFICATION const &)>
 
using DO_PLACE_ITEM = std::function< void(SCH_SHEET *, SCH_SHEET_PATH, SHEET_SYNCHRONIZATION_PLACEMENT, EDA_ITEM *)>
 

Public Member Functions

 SHEET_SYNCHRONIZATION_AGENT (DO_MODIFY_ITEM aDoModify, DO_DELETE_ITEM aDoDelete, DO_PLACE_ITEM aPlaceItem, TOOL_MANAGER *aToolManager, SCH_EDIT_FRAME *a_frame)
 
 ~SHEET_SYNCHRONIZATION_AGENT ()
 
void ModifyItem (SHEET_SYNCHRONIZATION_ITEM &aItem, std::function< void()> const &aDoModify, const SCH_SHEET_PATH &aPath)
 
void ModifyItem (SCH_ITEM *aItem, std::function< void()> const &aDoModify, const SCH_SHEET_PATH &aPath, SHEET_SYNCHRONIZATION_ITEM_KIND aKind)
 
void RemoveItem (SHEET_SYNCHRONIZATION_ITEM &aItem, SCH_SHEET *aSheet, SCH_SHEET_PATH const &aPath)
 
void PlaceSheetPin (SCH_SHEET *aSheet, SCH_SHEET_PATH const &aPath, SCH_HIERLABEL *aLabel)
 
void PlaceHieraLable (SCH_SHEET *aSheet, SCH_SHEET_PATH const &aPath, SCH_SHEET_PIN *aPin)
 

Private Attributes

DO_MODIFY_ITEM m_doModify
 
DO_DELETE_ITEM m_doDelete
 
DO_PLACE_ITEM m_doPlaceItem
 
TOOL_MANAGERm_toolManager
 
SCH_EDIT_FRAMEm_frame
 

Detailed Description

Agent for all the modifications while syncing the sheet pin and hierarchical label.

Definition at line 46 of file sheet_synchronization_agent.h.

Member Typedef Documentation

◆ DO_DELETE_ITEM

Definition at line 55 of file sheet_synchronization_agent.h.

◆ DO_MODIFY_ITEM

Definition at line 59 of file sheet_synchronization_agent.h.

◆ DO_PLACE_ITEM

◆ MODIFICATION

using SHEET_SYNCHRONIZATION_AGENT::MODIFICATION = std::function<void()>

Definition at line 57 of file sheet_synchronization_agent.h.

Member Enumeration Documentation

◆ SHEET_SYNCHRONIZATION_PLACEMENT

Enumerator
PLACE_SHEET_PIN 
PLACE_HIERLABEL 

Definition at line 49 of file sheet_synchronization_agent.h.

Constructor & Destructor Documentation

◆ SHEET_SYNCHRONIZATION_AGENT()

SHEET_SYNCHRONIZATION_AGENT::SHEET_SYNCHRONIZATION_AGENT ( DO_MODIFY_ITEM  aDoModify,
DO_DELETE_ITEM  aDoDelete,
DO_PLACE_ITEM  aPlaceItem,
TOOL_MANAGER aToolManager,
SCH_EDIT_FRAME a_frame 
)

Definition at line 33 of file sheet_synchronization_agent.cpp.

◆ ~SHEET_SYNCHRONIZATION_AGENT()

SHEET_SYNCHRONIZATION_AGENT::~SHEET_SYNCHRONIZATION_AGENT ( )
default

Member Function Documentation

◆ ModifyItem() [1/2]

void SHEET_SYNCHRONIZATION_AGENT::ModifyItem ( SCH_ITEM aItem,
std::function< void()> const &  aDoModify,
const SCH_SHEET_PATH aPath,
SHEET_SYNCHRONIZATION_ITEM_KIND  aKind 
)

Definition at line 58 of file sheet_synchronization_agent.cpp.

References m_doModify, and SCH_SHEET_PATH::pop_back().

◆ ModifyItem() [2/2]

void SHEET_SYNCHRONIZATION_AGENT::ModifyItem ( SHEET_SYNCHRONIZATION_ITEM aItem,
std::function< void()> const &  aDoModify,
const SCH_SHEET_PATH aPath 
)

◆ PlaceHieraLable()

void SHEET_SYNCHRONIZATION_AGENT::PlaceHieraLable ( SCH_SHEET aSheet,
SCH_SHEET_PATH const &  aPath,
SCH_SHEET_PIN aPin 
)

◆ PlaceSheetPin()

void SHEET_SYNCHRONIZATION_AGENT::PlaceSheetPin ( SCH_SHEET aSheet,
SCH_SHEET_PATH const &  aPath,
SCH_HIERLABEL aLabel 
)

◆ RemoveItem()

void SHEET_SYNCHRONIZATION_AGENT::RemoveItem ( SHEET_SYNCHRONIZATION_ITEM aItem,
SCH_SHEET aSheet,
SCH_SHEET_PATH const &  aPath 
)

Member Data Documentation

◆ m_doDelete

DO_DELETE_ITEM SHEET_SYNCHRONIZATION_AGENT::m_doDelete
private

Definition at line 86 of file sheet_synchronization_agent.h.

Referenced by RemoveItem().

◆ m_doModify

DO_MODIFY_ITEM SHEET_SYNCHRONIZATION_AGENT::m_doModify
private

Definition at line 85 of file sheet_synchronization_agent.h.

Referenced by ModifyItem().

◆ m_doPlaceItem

DO_PLACE_ITEM SHEET_SYNCHRONIZATION_AGENT::m_doPlaceItem
private

Definition at line 87 of file sheet_synchronization_agent.h.

Referenced by PlaceHieraLable(), and PlaceSheetPin().

◆ m_frame

SCH_EDIT_FRAME* SHEET_SYNCHRONIZATION_AGENT::m_frame
private

Definition at line 89 of file sheet_synchronization_agent.h.

◆ m_toolManager

TOOL_MANAGER* SHEET_SYNCHRONIZATION_AGENT::m_toolManager
private

Definition at line 88 of file sheet_synchronization_agent.h.


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