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

A holder to handle a list of undo (or redo) commands. More...

#include <undo_redo_container.h>

Public Member Functions

 UNDO_REDO_CONTAINER ()
 
 ~UNDO_REDO_CONTAINER ()
 
 UNDO_REDO_CONTAINER (const UNDO_REDO_CONTAINER &)=delete
 
UNDO_REDO_CONTAINER & operator= (const UNDO_REDO_CONTAINER &)=delete
 
void PushCommand (PICKED_ITEMS_LIST *aCommand)
 
PICKED_ITEMS_LIST * PopCommand ()
 
void ClearCommandList ()
 
void ForgetItems (const std::unordered_set< const EDA_ITEM * > &aItems)
 Drop every picker that refers to one of aItems, before they are freed outside the undo system.
 

Public Attributes

std::vector< PICKED_ITEMS_LIST * > m_CommandsList
 

Detailed Description

A holder to handle a list of undo (or redo) commands.

Definition at line 287 of file undo_redo_container.h.

Constructor & Destructor Documentation

◆ UNDO_REDO_CONTAINER() [1/2]

UNDO_REDO_CONTAINER::UNDO_REDO_CONTAINER ( )

Definition at line 301 of file undo_redo_container.cpp.

Referenced by operator=(), and UNDO_REDO_CONTAINER().

◆ ~UNDO_REDO_CONTAINER()

UNDO_REDO_CONTAINER::~UNDO_REDO_CONTAINER ( )

Definition at line 306 of file undo_redo_container.cpp.

References ClearCommandList().

◆ UNDO_REDO_CONTAINER() [2/2]

UNDO_REDO_CONTAINER::UNDO_REDO_CONTAINER ( const UNDO_REDO_CONTAINER & )
delete

References UNDO_REDO_CONTAINER().

Member Function Documentation

◆ ClearCommandList()

void UNDO_REDO_CONTAINER::ClearCommandList ( )

Definition at line 312 of file undo_redo_container.cpp.

References m_CommandsList.

Referenced by ~UNDO_REDO_CONTAINER().

◆ ForgetItems()

void UNDO_REDO_CONTAINER::ForgetItems ( const std::unordered_set< const EDA_ITEM * > & aItems)

Drop every picker that refers to one of aItems, before they are freed outside the undo system.

Commands left with no pickers are removed.

Definition at line 329 of file undo_redo_container.cpp.

References PICKED_ITEMS_LIST::GetCount(), and m_CommandsList.

◆ operator=()

UNDO_REDO_CONTAINER & UNDO_REDO_CONTAINER::operator= ( const UNDO_REDO_CONTAINER & )
delete

References UNDO_REDO_CONTAINER().

◆ PopCommand()

PICKED_ITEMS_LIST * UNDO_REDO_CONTAINER::PopCommand ( )

Definition at line 361 of file undo_redo_container.cpp.

References m_CommandsList.

◆ PushCommand()

void UNDO_REDO_CONTAINER::PushCommand ( PICKED_ITEMS_LIST * aCommand)

Member Data Documentation

◆ m_CommandsList


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