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

Description

Position the cursor relative to the indicated cell.

If position is 'next' and there is no input cell following the indicated one, create a new one.

#include <Actions.hh>

Inheritance diagram for cadabra::ActionPositionCursor:
cadabra::ActionBase

Public Types

enum class  Position { in , next , previous }
 

Public Member Functions

 ActionPositionCursor (DataCell::id_t ref_id_, Position pos_)
 
virtual ~ActionPositionCursor ()
 
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

uint64_t needed_new_cell_with_id
 
DTree::iterator newref
 
Position pos
 

Additional Inherited Members

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

Member Enumeration Documentation

◆ Position

Enumerator
in 
next 
previous 

Constructor & Destructor Documentation

◆ ActionPositionCursor()

ActionPositionCursor::ActionPositionCursor ( DataCell::id_t  ref_id_,
Position  pos_ 
)

◆ ~ActionPositionCursor()

virtual cadabra::ActionPositionCursor::~ActionPositionCursor ( )
inlinevirtual

Member Function Documentation

◆ execute()

void ActionPositionCursor::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 ActionPositionCursor::revert ( DocumentThread ,
GUIBase  
)
overridevirtual

Revert the change to the DTree document and the GUI.

Implements cadabra::ActionBase.

Member Data Documentation

◆ needed_new_cell_with_id

uint64_t cadabra::ActionPositionCursor::needed_new_cell_with_id
private

◆ newref

DTree::iterator cadabra::ActionPositionCursor::newref
private

◆ pos

Position cadabra::ActionPositionCursor::pos
private

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