Public Member Functions

RealWorldScaleRecord< T > Class Template Reference

Search for all occurrences

Detailed Description

template<class T>
class RealWorldScaleRecord< T >

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>

Inheritance diagram for RealWorldScaleRecord< T >:
Inheritance graph
[legend]

List of all members.

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.

Constructor & Destructor Documentation

RealWorldScaleRecord ( T *  pObj,
BOOL  oldState 
) [inline]

Create a real-world map size undo record.

Parameters:
[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;
    }

Member Function Documentation

void Restore ( int  isUndo ) [inline, virtual]

Restores the state of the database to when this RestoreObj was added to the hold.

See also:
RestoreObj::Restore

Implements RestoreObj.

    {
        if (isUndo)
            mpObj->SetUsePhysicalScaleUVs(mOldState);
    }  
void Redo ( ) [inline, virtual]

Restores the database to the state prior to the last undo command.

See also:
RestoreObj::Redo

Implements RestoreObj.

    {
        mpObj->SetUsePhysicalScaleUVs(!mOldState);
    }