Public Member Functions | Public Attributes

PatchObjectRestore Class Reference

Search for all occurrences

#include <patchobj.h>

Inheritance diagram for PatchObjectRestore:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  PatchObjectRestore (PatchObject *po, POModRecord *rec)
virtual  ~PatchObjectRestore ()
void  Restore (int isUndo)
void  Redo ()
int  Size ()
void  EndHold ()
MSTR  Description ()

Public Attributes

POModRecord rec
PatchObject po

Constructor & Destructor Documentation

virtual ~PatchObjectRestore ( ) [virtual]

Member Function Documentation

void Restore ( int  isUndo ) [virtual]
Remarks:
The developer implements this method to restore the state of the database to as it was when theHold.Put() was called with this restore object.

Regardless of the value of the isUndo parameter, the method must restore the state of the scene to the one it was in when theHold.Put() was called with this restore object.

RestoreObj::Restore and RestoreObj::Redo may be called several times in a row: these methods must protect against any problems that may arise because of this, such as trying to undo multiple times in a row what has been undone already.
Parameters:
isUndo Nonzero if Restore() is being called in response to the Undo command; otherwise zero. If isUndo is nonzero, the developer needs to save whatever data they need to allow the user to redo the operation.

Implements RestoreObj.

void Redo ( ) [virtual]
Remarks:
This method is called when the user selects the Redo command. The developer should restore the database to the state prior to the last Undo command.

Implements RestoreObj.

int Size ( ) [inline, virtual]
Remarks:
Returns the size of the restore object in bytes. This size does not need to be exact but should be close. This is used to make sure all the accumulated restore objects do not grow beyond a manageable size.
Default Implementation:
{ return 1; }
Returns:
The size of the restore object in bytes.

Reimplemented from RestoreObj.

{ return 1; }
void EndHold ( ) [inline, virtual]
Remarks:
This method is called when theHold.Accept() or theHold.Cancel() is called. This means the restore object is no longer held, it was either tossed out or sent to the undo system. The developer may then call ClearAFlag(A_HELD) to indicate the restore object is no longer being held.

Reimplemented from RestoreObj.

MSTR Description ( ) [inline, virtual]
Remarks:
This method is used internally to 3ds Max in debugging only. It is used to display a symbolic name for the restore object.
Returns:
The name of the restore object.
Default Implementation:
{ return MSTR(_M("---")); }

Reimplemented from RestoreObj.

{ return MSTR(_M("PatchObject restore")); }

Member Data Documentation


PatchObjectRestore PatchObjectRestore PatchObjectRestore PatchObjectRestore PatchObjectRestore PatchObjectRestore PatchObjectRestore PatchObjectRestore PatchObjectRestore PatchObjectRestore
PatchObjectRestore PatchObjectRestore PatchObjectRestore PatchObjectRestore PatchObjectRestore PatchObjectRestore PatchObjectRestore PatchObjectRestore PatchObjectRestore PatchObjectRestore