Gridarta Editor
net.sf.gridarta.model.undo.UndoState< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R > Class Template Reference

Holds information to undo/redo one edit operation. More...

+ Collaboration diagram for net.sf.gridarta.model.undo.UndoState< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:

Public Member Functions

getMapArchObject ()
 Returns the map arch object before the operation started. More...
 
String getName ()
 Return the name of the operation. More...
 
SavedSquares< G, A, R > getSavedSquares ()
 Returns the map squares that have changed in the operation. More...
 
void setSavedSquares (@NotNull final SavedSquares< G, A, R > savedSquares)
 Records the affected map squares. More...
 
 UndoState (@NotNull final String name, @NotNull final A mapArchObject)
 Create a new instance. More...
 

Private Attributes

final A mapArchObject
 The map arch object before the operation started. More...
 
final String name
 The name of the operation. More...
 
SavedSquares< G, A, R > savedSquares
 The affected map squares. More...
 

Detailed Description

Holds information to undo/redo one edit operation.

It consists of the map model state, the map arch object state, and the name of the edit operation.

Author
Andreas Kirschbaum

Definition at line 34 of file UndoState.java.

Constructor & Destructor Documentation

◆ UndoState()

net.sf.gridarta.model.undo.UndoState< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.UndoState ( @NotNull final String  name,
@NotNull final A  mapArchObject 
)

Member Function Documentation

◆ getMapArchObject()

◆ getName()

String net.sf.gridarta.model.undo.UndoState< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getName ( )

◆ getSavedSquares()

SavedSquares<G, A, R> net.sf.gridarta.model.undo.UndoState< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getSavedSquares ( )

Returns the map squares that have changed in the operation.

Returns
the changed map squares
Exceptions
IllegalStateExceptionif no saved squares have been recorded

Definition at line 97 of file UndoState.java.

References net.sf.gridarta.model.undo.UndoState< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.savedSquares.

◆ setSavedSquares()

void net.sf.gridarta.model.undo.UndoState< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.setSavedSquares ( @NotNull final SavedSquares< G, A, R >  savedSquares)

Member Data Documentation

◆ mapArchObject

◆ name

◆ savedSquares


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