ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
vtkUndoElement Class Referenceabstract

#include <vtkUndoElement.h>

Inheritance diagram for vtkUndoElement:
[legend]
Collaboration diagram for vtkUndoElement:
[legend]

Public Member Functions

 vtkTypeMacro (vtkUndoElement, vtkObject)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
virtual int Undo ()=0
 
virtual int Redo ()=0
 
 vtkGetMacro (Mergeable, bool)
 
virtual bool Merge (vtkUndoElement *vtkNotUsed(new_element))
 
virtual void SetUndoSetWorkingContext (vtkCollection *workCTX)
 

Protected Member Functions

 vtkUndoElement ()
 
 ~vtkUndoElement () override
 
 vtkSetMacro (Mergeable, bool)
 

Protected Attributes

bool Mergeable
 
vtkCollection * UndoSetWorkingContext
 

Constructor & Destructor Documentation

◆ vtkUndoElement()

vtkUndoElement::vtkUndoElement ( )
protected

References Mergeable.

◆ ~vtkUndoElement()

vtkUndoElement::~vtkUndoElement ( )
overrideprotected

Member Function Documentation

◆ Merge()

virtual bool vtkUndoElement::Merge ( vtkUndoElement *  vtkNotUsednew_element)
inlinevirtual

Called on the older element in the UndoSet to merge with the element being added if both the elements are mergeable. Returns if the merge was successful. Default implementation doesn't do anything.

Referenced by vtkUndoSet::AddElement().

◆ PrintSelf()

void vtkUndoElement::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
override

References QtCompat::endl(), and Mergeable.

◆ Redo()

virtual int vtkUndoElement::Redo ( )
pure virtual

Redo the operation encaspsulated by this element.

Returns
the status of the operation, 1 on success, 0 otherwise.

Referenced by vtkUndoSet::Redo(), and vtkUndoSet::Undo().

◆ SetUndoSetWorkingContext()

virtual void vtkUndoElement::SetUndoSetWorkingContext ( vtkCollection *  workCTX)
inlinevirtual

◆ Undo()

virtual int vtkUndoElement::Undo ( )
pure virtual

Undo the operation encapsulated by this element.

Returns
the status of the operation, 1 on success, 0 otherwise.

Referenced by vtkUndoSet::Redo(), and vtkUndoSet::Undo().

◆ vtkGetMacro()

vtkUndoElement::vtkGetMacro ( Mergeable  ,
bool   
)

Returns if this undo element can be merged with other undo elements. When an undo element is added to a vtkUndoSet unsing AddElement, an attempt is made to "merge" the element with the most recently added undo element, if any, if both the undo elements are mergeable.

◆ vtkSetMacro()

vtkUndoElement::vtkSetMacro ( Mergeable  ,
bool   
)
protected

◆ vtkTypeMacro()

vtkUndoElement::vtkTypeMacro ( vtkUndoElement  ,
vtkObject   
)

Member Data Documentation

◆ Mergeable

bool vtkUndoElement::Mergeable
protected

Subclasses must set this flag to enable merging of consecutive elements in an UndoSet.

Referenced by PrintSelf(), and vtkUndoElement().

◆ UndoSetWorkingContext

vtkCollection* vtkUndoElement::UndoSetWorkingContext
protected

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