AlphaFramework API  1.0.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Protected Member Functions | List of all members
AlphaFramework.Editor.World.Commands.ImportXmlBase< TUniverse > Class Template Referenceabstract

Common base for loading new XML data into a IUniverse. More...

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

Protected Member Functions

 ImportXmlBase (Func< TUniverse > getUniverse, Action< TUniverse > setUniverse, string xmlData, Action refreshHandler)
 Creates a new command for loading XML data into a TUniverse . More...
 
override void OnFirstExecute ()
 Imports the XML data More...
 
abstract void TransferNonXmlData (TUniverse oldUniverse, TUniverse newUniverse)
 Transfers any non-serialized data from oldUniverse to newUniverse . More...
 
override void OnRedo ()
 Restores the imported XML data More...
 
override void OnUndo ()
 Restores the original XML data More...
 

Additional Inherited Members

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

Detailed Description

Common base for loading new XML data into a IUniverse.

Template Parameters
TUniverseThe specific type of IUniverse to load XML data for.
Type Constraints
TUniverse :class 
TUniverse :IUniverse 

Constructor & Destructor Documentation

AlphaFramework.Editor.World.Commands.ImportXmlBase< TUniverse >.ImportXmlBase ( Func< TUniverse >  getUniverse,
Action< TUniverse >  setUniverse,
string  xmlData,
Action  refreshHandler 
)
inlineprotected

Creates a new command for loading XML data into a TUniverse .

Parameters
getUniverseCalled to get the current TUniverse in the editor.
setUniverseCalled to change the current TUniverse in the editor.
xmlDataThe XML string to parse.
refreshHandlerCalled when the presenter needs to be reset.

Member Function Documentation

override void AlphaFramework.Editor.World.Commands.ImportXmlBase< TUniverse >.OnFirstExecute ( )
inlineprotectedvirtual

Imports the XML data

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

override void AlphaFramework.Editor.World.Commands.ImportXmlBase< TUniverse >.OnRedo ( )
inlineprotectedvirtual

Restores the imported XML data

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

override void AlphaFramework.Editor.World.Commands.ImportXmlBase< TUniverse >.OnUndo ( )
inlineprotectedvirtual

Restores the original XML data

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

abstract void AlphaFramework.Editor.World.Commands.ImportXmlBase< TUniverse >.TransferNonXmlData ( TUniverse  oldUniverse,
TUniverse  newUniverse 
)
protectedpure virtual

Transfers any non-serialized data from oldUniverse to newUniverse .


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