MeVisLab Toolbox Reference
ml::CSOCommand Class Referenceabstract

Base class for a CSOCommand for the undo/redo mechanism. More...

#include <CSOUndoRedoCommands.h>

Inheritance diagram for ml::CSOCommand:
ml::CSOCmdAddCSO ml::CSOCmdAddCSOGroup ml::CSOCmdAddCSOList ml::CSOCmdAddCSOSet ml::CSOCmdAddCSOtoGroup ml::CSOCmdCSOModifyVisualAttributes ml::CSOCmdInsertRemoveSeedPoint ml::CSOCmdModifySet ml::CSOCmdMoveContour ml::CSOCmdMoveSeedPoint ml::CSOCmdRemoveCSO ml::CSOCmdRemoveCSOGroup ml::CSOCmdRemoveCSOSet ml::CSOCmdRemoveCSOfromGroup

Public Member Functions

 CSOCommand (const CSOListPtr &csoList)
 Constructor. More...
 
 ~CSOCommand () override
 Destructor. More...
 
virtual int execute ()=0
 Execute method, must be overridden by each derived class. More...
 
void undo () override
 calls execute More...
 

Public Attributes

std::string commandName
 The command as a string (for debugging purposes). More...
 

Protected Member Functions

bool checkRedoBehavior () const override
 Not every undo step generates a redo step (a previous step might generate two instead), so... More...
 

Protected Attributes

CSOList_csoList
 Pointer to the csoList. More...
 

Detailed Description

Base class for a CSOCommand for the undo/redo mechanism.

Definition at line 30 of file CSOUndoRedoCommands.h.

Constructor & Destructor Documentation

◆ CSOCommand()

ml::CSOCommand::CSOCommand ( const CSOListPtr &  csoList)

Constructor.

◆ ~CSOCommand()

ml::CSOCommand::~CSOCommand ( )
override

Destructor.

Member Function Documentation

◆ checkRedoBehavior()

bool ml::CSOCommand::checkRedoBehavior ( ) const
inlineoverrideprotected

Not every undo step generates a redo step (a previous step might generate two instead), so...

Definition at line 53 of file CSOUndoRedoCommands.h.

◆ execute()

virtual int ml::CSOCommand::execute ( )
pure virtual

◆ undo()

void ml::CSOCommand::undo ( )
override

calls execute

Member Data Documentation

◆ _csoList

CSOList* ml::CSOCommand::_csoList
protected

Pointer to the csoList.

Definition at line 56 of file CSOUndoRedoCommands.h.

◆ commandName

std::string ml::CSOCommand::commandName

The command as a string (for debugging purposes).

Definition at line 48 of file CSOUndoRedoCommands.h.


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