AlphaFramework API  1.0.3
Protected Member Functions | Protected Attributes | Properties | List of all members
AlphaFramework.Editor.World.Commands.ImportMap< T > Class Template Referenceabstract

Abstract base class for commands that load new map data into a ITerrain. More...

Inheritance diagram for AlphaFramework.Editor.World.Commands.ImportMap< T >:
NanoByte::Common::Undo::FirstExecuteCommand NanoByte::Common::Undo::IUndoCommand

Protected Member Functions

 ImportMap (ITerrain terrain, string fileName, Action refreshHandler)
 Creates a new command for loading map data into a ITerrain. More...
 
override void OnFirstExecute ()
 Imports the map data More...
 
override void OnRedo ()
 Restores the imported map data More...
 
override void OnUndo ()
 Restores the original map data More...
 
abstract void LoadMap ()
 Override to load the map data from a file into the ITerrain More...
 

Protected Attributes

readonly ITerrain Terrain
 
readonly string FileName
 

Properties

abstract T MapData [get, set]
 Override to point to the appropriate ITerrain array map More...
 

Additional Inherited Members

- Public Member Functions inherited from NanoByte::Common::Undo::FirstExecuteCommand
void Execute ()
 
virtual void Undo ()
 

Detailed Description

Abstract base class for commands that load new map data into a ITerrain.

Template Parameters
TThe type of the map data to be imported.
Type Constraints
T :class 

Constructor & Destructor Documentation

◆ ImportMap()

AlphaFramework.Editor.World.Commands.ImportMap< T >.ImportMap ( ITerrain  terrain,
string  fileName,
Action  refreshHandler 
)
inlineprotected

Creates a new command for loading map data into a ITerrain.

Parameters
terrainThe ITerrain to load new map data into.
fileNameThe file to load the map data from.
refreshHandlerCalled when the presenter needs to be reset.

Member Function Documentation

◆ LoadMap()

abstract void AlphaFramework.Editor.World.Commands.ImportMap< T >.LoadMap ( )
protectedpure virtual

Override to load the map data from a file into the ITerrain

Implemented in AlphaFramework.Editor.World.Commands.ImportHeightMap, and AlphaFramework.Editor.World.Commands.ImportTextureMap.

◆ OnFirstExecute()

override void AlphaFramework.Editor.World.Commands.ImportMap< T >.OnFirstExecute ( )
inlineprotectedvirtual

Imports the map data

Implements NanoByte::Common::Undo::FirstExecuteCommand.

◆ OnRedo()

override void AlphaFramework.Editor.World.Commands.ImportMap< T >.OnRedo ( )
inlineprotectedvirtual

Restores the imported map data

Implements NanoByte::Common::Undo::FirstExecuteCommand.

◆ OnUndo()

override void AlphaFramework.Editor.World.Commands.ImportMap< T >.OnUndo ( )
inlineprotectedvirtual

Restores the original map data

Implements NanoByte::Common::Undo::FirstExecuteCommand.

Property Documentation

◆ MapData

abstract T AlphaFramework.Editor.World.Commands.ImportMap< T >.MapData
getsetprotected

Override to point to the appropriate ITerrain array map


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