AITestMode Class Reference

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

Inheritance diagram for AITestMode:

AIObject

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 Protected Member Functions

static bool ModeProc ()
 The callback proc for Testing 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.


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!


Generated on Wed Mar 31 22:45:10 2010 for OpenTTD NoAI API by  doxygen 1.5.6