Public Member Functions | Static Protected Member Functions | Private Attributes

ScriptTestMode Class Reference

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

#include <script_testmode.hpp>

Inheritance diagram for ScriptTestMode:
ScriptObject SimpleCountedObject

Public Member Functions

 ScriptTestMode ()
 Creating instance of this class switches the build mode to Testing.
 ~ScriptTestMode ()
 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 Testing 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 Test Mode.

If you create an instance of this class, the mode will be switched to Testing. The original mode is stored and recovered from when ever the instance is destroyed. In Test mode all the commands you execute aren't really executed. The system only checks if it would be able to execute your requests, and what the cost would be. ai

Definition at line 27 of file script_testmode.hpp.


Constructor & Destructor Documentation

ScriptTestMode::ScriptTestMode (  ) 

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

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_testmode.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: