Cadabra
Computer algebra system for field theory problems
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | List of all members
cadabra::ActionBase Class Referenceabstract

Description

All actions derive from the ActionBase object, which defines the interface they need to implement.

These objects are used to pass (user) action instructions around. They can be stored in undo/redo stacks. All actions run on the GUI thread. The update_gui members typically call members of the GUIBase class. Action objects are allowed to modify the DTree document doc, since they essentially contain code which is part of the DocumentThread object.

#include <Actions.hh>

Inheritance diagram for cadabra::ActionBase:
cadabra::ActionAddCell cadabra::ActionEraseText cadabra::ActionInsertText cadabra::ActionPositionCursor cadabra::ActionRemoveCell cadabra::ActionSetRunStatus cadabra::ActionSplitCell

Public Member Functions

virtual void execute (DocumentThread &, GUIBase &)=0
 Perform the action. More...
 
virtual void revert (DocumentThread &, GUIBase &)=0
 Revert the change to the DTree document and the GUI. More...
 
virtual bool undoable () const
 Can this action be undone? More...
 

Member Function Documentation

virtual void cadabra::ActionBase::execute ( DocumentThread &  ,
GUIBase &   
)
pure virtual

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.

Implemented in cadabra::ActionEraseText, cadabra::ActionInsertText, cadabra::ActionSplitCell, cadabra::ActionRemoveCell, cadabra::ActionSetRunStatus, cadabra::ActionPositionCursor, and cadabra::ActionAddCell.

virtual void cadabra::ActionBase::revert ( DocumentThread &  ,
GUIBase &   
)
pure virtual
bool ActionBase::undoable ( ) const
virtual

Can this action be undone?

Reimplemented in cadabra::ActionSetRunStatus.


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