bande::UndoInt Class Reference

Undo information for modification of one int variable. More...

#include <UndoManager.hh>

Inheritance diagram for bande::UndoInt:
Inheritance graph
[legend]
Collaboration diagram for bande::UndoInt:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 UndoInt (int *p, int v)
 Record undo information given pointer and previous value.
 UndoInt (int &i)
 Record undo information using a reference to the variable.
void undo ()
 Undo the modification.

Protected Attributes

int * ptr
 Address of the modified variable.
int val
 Old value of the modified variable.

Detailed Description

Undo information for modification of one int variable.

Definition at line 168 of file UndoManager.hh.


Constructor & Destructor Documentation

bande::UndoInt::UndoInt ( int *  p,
int  v 
) [inline]

Record undo information given pointer and previous value.

Parameters:
p the pointer of the variable about to be modified.
v the old value of the variable to be restored upon undo.

Definition at line 177 of file UndoManager.hh.

bande::UndoInt::UndoInt ( int &  i  )  [inline]

Record undo information using a reference to the variable.

The supplied reference will be used to record both the variable's address and its current (old) value.

Parameters:
i the variable that is about to be modified.

Definition at line 185 of file UndoManager.hh.


Member Function Documentation

void bande::UndoInt::undo (  )  [inline, virtual]

Undo the modification.

The recorded old value is written to the recoded address.

Implements bande::UndoBase.

Definition at line 191 of file UndoManager.hh.

References ptr, and val.


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

Generated on Fri Aug 21 08:17:19 2009 for bande by  doxygen 1.6.0