Cadabra
Computer algebra system for field theory problems
Public Member Functions | Private Attributes | List of all members
cadabra::ActionRemoveCell Class Reference

Description

Remove a cell and all its child cells from the document.

#include <Actions.hh>

Inheritance diagram for cadabra::ActionRemoveCell:
cadabra::ActionBase

Public Member Functions

 ActionRemoveCell (DataCell::id_t ref_id_)
 
virtual ~ActionRemoveCell ()
 
virtual void execute (DocumentThread &, GUIBase &) override
 Perform the action. More...
 
virtual void revert (DocumentThread &, GUIBase &) override
 Revert the change to the DTree document and the GUI. More...
 
- Public Member Functions inherited from cadabra::ActionBase
 ActionBase (DataCell::id_t ref_id)
 
virtual bool undoable () const
 Can this action be undone? More...
 

Private Attributes

DTree removed_tree
 
DTree::iterator reference_parent_cell
 
size_t reference_child_index
 

Additional Inherited Members

- Public Attributes inherited from cadabra::ActionBase
DataCell::id_t ref_id
 
- Protected Attributes inherited from cadabra::ActionBase
DTree::iterator ref
 

Constructor & Destructor Documentation

◆ ActionRemoveCell()

ActionRemoveCell::ActionRemoveCell ( DataCell::id_t  ref_id_)

◆ ~ActionRemoveCell()

ActionRemoveCell::~ActionRemoveCell ( )
virtual

Member Function Documentation

◆ execute()

void ActionRemoveCell::execute ( DocumentThread cl,
GUIBase  
)
overridevirtual

Perform the action.

This should update both the document tree data structure and the GUI. The latter is updated by calling relevant methods on the GUIBase object passed in.

Reimplemented from cadabra::ActionBase.

◆ revert()

void ActionRemoveCell::revert ( DocumentThread ,
GUIBase  
)
overridevirtual

Revert the change to the DTree document and the GUI.

Implements cadabra::ActionBase.

Member Data Documentation

◆ reference_child_index

size_t cadabra::ActionRemoveCell::reference_child_index
private

◆ reference_parent_cell

DTree::iterator cadabra::ActionRemoveCell::reference_parent_cell
private

◆ removed_tree

DTree cadabra::ActionRemoveCell::removed_tree
private

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