Class for creating undo record for any class with a "Real-World Map Size" property.
This is a template class where the template parameter T is the type which supports the real-world map size property. This class must have a method called SetUsePhysicalScaleUVs(BOOL state).
#include <RealWorldMapUtils.h>
Public Member Functions |
|
RealWorldScaleRecord (T *pObj, BOOL oldState) | |
Create a real-world map size undo record.
|
|
void | Restore (int isUndo) |
Restores the state of the database to when
this RestoreObj was
added to the hold. |
|
void | Redo () |
Restores the database to the state prior to
the last undo command. |
RealWorldScaleRecord | ( | T * | pObj, |
BOOL | oldState | ||
) | [inline] |
Create a real-world map size undo record.
[in] | pObj | - the object which supports the undo/redo toggle |
[in] | oldState | - the state of the real-world map size toggle to restore to. |
{ mpObj = pObj; mOldState = oldState; }
void Restore | ( | int | isUndo | ) | [inline, virtual] |
Restores the state of the database to when this RestoreObj was added to the hold.
Implements RestoreObj.
{
if (isUndo)
mpObj->SetUsePhysicalScaleUVs(mOldState);
}
void Redo | ( | ) | [inline, virtual] |
Restores the database to the state prior to the last undo command.
Implements RestoreObj.
{ mpObj->SetUsePhysicalScaleUVs(!mOldState); }