# AITestMode Class Reference

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

`#include <ai_testmode.hpp>`

Inheritance diagram for AITestMode:

## Public Member Functions
| AITestMode ()
| Creating instance of this class switches the build mode to Testing.
| ~AITestMode ()
| Destroying this instance reset the building mode to the mode it was in when the instance was created.
## Static Public Member Functions
static const char * | GetClassName ()
| Get the name of this class to identify it towards squirrel.
## Static Protected Member Functions
static bool | ModeProc ()
| The callback proc for Testing mode.
## Private Attributes
AIModeProc * | last_mode
AIObject * | last_instance

## 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.

Definition at line 26 of file ai_testmode.hpp.

## Constructor & Destructor Documentation

AITestMode::AITestMode | ( |  | ) |

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 25 of file ai_testmode.cpp.

References AIObject::GetDoCommandMode(), AIObject::GetDoCommandModeInstance(), ModeProc(), and AIObject::SetDoCommandMode().

## Member Function Documentation

static const char* AITestMode::GetClassName | ( |  | ) | `[inline, static]`

Get the name of this class to identify it towards squirrel.

Definition at line 29 of file ai_testmode.hpp.

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

- src/ai/api/ai_testmode.hpp
- src/ai/api/ai_testmode.cpp