Public Member Functions | Static Protected Member Functions | Private Attributes

ScriptExecMode Class Reference

Class to switch current mode to Execute Mode. More...

#include <script_execmode.hpp>

Inheritance diagram for ScriptExecMode:
ScriptObject SimpleCountedObject

Public Member Functions

 ScriptExecMode ()
 Creating instance of this class switches the build mode to Execute.
 ~ScriptExecMode ()
 Destroying this instance reset the building mode to the mode it was in when the instance was created.

Static Protected Member Functions

static bool ModeProc ()
 The callback proc for Execute mode.

Private Attributes

ScriptModeProclast_mode
 The previous mode we were in.
ScriptObjectlast_instance
 The previous instace of the mode.

Detailed Description

Class to switch current mode to Execute Mode.

If you create an instance of this class, the mode will be switched to Execute. The original mode is stored and recovered from when ever the instance is destroyed. In Execute mode all commands you do are executed for real. ai

Definition at line 25 of file script_execmode.hpp.


Constructor & Destructor Documentation

ScriptExecMode::ScriptExecMode (  ) 

Creating instance of this class switches the build mode to Execute.

Note:
When the instance is destroyed, he restores the mode that was current when the instance was created!

Definition at line 26 of file script_execmode.cpp.

References ScriptObject::GetDoCommandMode(), ScriptObject::GetDoCommandModeInstance(), last_instance, last_mode, ModeProc(), and ScriptObject::SetDoCommandMode().


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