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 <undo_redo_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 311 of file undo_redo_container.h.

Constructor & Destructor Documentation

UNDO_REDO_CONTAINER::UNDO_REDO_CONTAINER ( )

Definition at line 282 of file undo_redo_container.cpp.

283 {
284 }
UNDO_REDO_CONTAINER::~UNDO_REDO_CONTAINER ( )

Definition at line 287 of file undo_redo_container.cpp.

288 {
290 }

Member Function Documentation

void UNDO_REDO_CONTAINER::ClearCommandList ( )

Definition at line 293 of file undo_redo_container.cpp.

294 {
295  for( unsigned ii = 0; ii < m_CommandsList.size(); ii++ )
296  delete m_CommandsList[ii];
297 
298  m_CommandsList.clear();
299 }
std::vector< PICKED_ITEMS_LIST * > m_CommandsList
PICKED_ITEMS_LIST * UNDO_REDO_CONTAINER::PopCommand ( )

Definition at line 308 of file undo_redo_container.cpp.

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

309 {
310  if( m_CommandsList.size() != 0 )
311  {
312  PICKED_ITEMS_LIST* item = m_CommandsList.back();
313  m_CommandsList.pop_back();
314  return item;
315  }
316 
317  return NULL;
318 }
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 302 of file undo_redo_container.cpp.

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

303 {
304  m_CommandsList.push_back( aItem );
305 }
std::vector< PICKED_ITEMS_LIST * > m_CommandsList

Member Data Documentation


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