KiCad PCB EDA Suite
UNDO_REDO_CONTAINER Class Reference

Class UNDO_REDO_CONTAINER is a holder to handle alist of undo (or redo) command. More...

#include <class_undoredo_container.h>

Public Member Functions

 UNDO_REDO_CONTAINER ()
 
 ~UNDO_REDO_CONTAINER ()
 
void PushCommand (PICKED_ITEMS_LIST *aCommand)
 
PICKED_ITEMS_LISTPopCommand ()
 
void ClearCommandList ()
 

Public Attributes

std::vector< PICKED_ITEMS_LIST * > m_CommandsList
 

Detailed Description

Class UNDO_REDO_CONTAINER is a holder to handle alist of undo (or redo) command.

this class handles a list of ITEM_PICKER (each manage one schematic or board item).

Definition at line 308 of file class_undoredo_container.h.

Constructor & Destructor Documentation

UNDO_REDO_CONTAINER::UNDO_REDO_CONTAINER ( )

Definition at line 308 of file class_undoredo_container.cpp.

309 {
310 }
UNDO_REDO_CONTAINER::~UNDO_REDO_CONTAINER ( )

Definition at line 313 of file class_undoredo_container.cpp.

References ClearCommandList().

314 {
316 }

Member Function Documentation

void UNDO_REDO_CONTAINER::ClearCommandList ( )

Definition at line 319 of file class_undoredo_container.cpp.

References m_CommandsList.

Referenced by ~UNDO_REDO_CONTAINER().

320 {
321  for( unsigned ii = 0; ii < m_CommandsList.size(); ii++ )
322  delete m_CommandsList[ii];
323 
324  m_CommandsList.clear();
325 }
std::vector< PICKED_ITEMS_LIST * > m_CommandsList
PICKED_ITEMS_LIST * UNDO_REDO_CONTAINER::PopCommand ( )

Definition at line 334 of file class_undoredo_container.cpp.

References m_CommandsList.

Referenced by BASE_SCREEN::PopCommandFromRedoList(), and BASE_SCREEN::PopCommandFromUndoList().

335 {
336  if( m_CommandsList.size() != 0 )
337  {
338  PICKED_ITEMS_LIST* item = m_CommandsList.back();
339  m_CommandsList.pop_back();
340  return item;
341  }
342 
343  return NULL;
344 }
std::vector< PICKED_ITEMS_LIST * > m_CommandsList
Class PICKED_ITEMS_LIST is a holder to handle information on schematic or board items.
void UNDO_REDO_CONTAINER::PushCommand ( PICKED_ITEMS_LIST aCommand)

Definition at line 328 of file class_undoredo_container.cpp.

References m_CommandsList.

Referenced by BASE_SCREEN::PushCommandToRedoList(), and BASE_SCREEN::PushCommandToUndoList().

329 {
330  m_CommandsList.push_back( aItem );
331 }
std::vector< PICKED_ITEMS_LIST * > m_CommandsList

Member Data Documentation


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