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

Description

Add a cell to the notebook.

#include <Actions.hh>

Inheritance diagram for cadabra::ActionAddCell:
cadabra::ActionBase

Public Types

enum  Position { Position::before, Position::after, Position::child }
 

Public Member Functions

 ActionAddCell (DataCell, DTree::iterator ref_, Position pos_)
 
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
virtual bool undoable () const
 Can this action be undone? More...
 

Private Attributes

DataCell newcell
 
DTree::iterator ref
 
DTree::iterator newref
 
Position pos
 
int child_num
 

Member Enumeration Documentation

Enumerator
before 
after 
child 

Constructor & Destructor Documentation

ActionAddCell::ActionAddCell ( DataCell  cell,
DTree::iterator  ref_,
Position  pos_ 
)

Member Function Documentation

void ActionAddCell::execute ( DocumentThread &  ,
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.

Implements cadabra::ActionBase.

void ActionAddCell::revert ( DocumentThread &  ,
GUIBase &   
)
overridevirtual

Revert the change to the DTree document and the GUI.

Implements cadabra::ActionBase.

Member Data Documentation

int cadabra::ActionAddCell::child_num
private
DataCell cadabra::ActionAddCell::newcell
private
DTree::iterator cadabra::ActionAddCell::newref
private
Position cadabra::ActionAddCell::pos
private
DTree::iterator cadabra::ActionAddCell::ref
private

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