torque Torque Game Engine Documentation
TGE Version 1.5.2

engine/platform/platformAssert.h File Reference

#include "platform/platform.h"

Data Structures

class  PlatformAssert

Defines

#define AssertFatal(x, y)   { }
#define AssertWarn(x, y)   { }
#define AssertISV(x, y)

Functions

const char * avar (const char *in_msg,...)


Define Documentation

#define AssertFatal ( x,
y   )     { }

#define AssertWarn ( x,
y   )     { }

#define AssertISV ( x,
y   ) 

Value:

{ if ((x)==0)         \
{ if ( PlatformAssert::processAssert(PlatformAssert::Fatal_ISV, __FILE__, __LINE__,  y) ) { Platform::debugBreak(); } } }
Assert (In Shipping Version) that the statement x is true, otherwise halt.

If the statement x is true, continue processing.

If the statement x is false, log the file and line where the assert occurred, the message y and exit the program displaying a dialog containing the message y. These asserts are present in both OPTIMIZED and DEBUG builds.

This assert should only be used for rare conditions where the application cannot continue execution without seg-faulting and you want to display a nice exit message.


Function Documentation

const char* avar ( const char *  in_msg,
  ... 
)

Sprintf style string formating into a fixed temporary buffer.

Parameters:
in_msg sprintf style format string
Returns:
pointer to fixed buffer containing formatted string
Example:
   U8 a = 5;
   S16 b = -10;
   char *output = avar("hello %s! a=%u, b=%d", "world");
   ouput = "hello world! a=5, b=-10"

Warning:
avar uses a static fixed buffer. Treat the buffer as volatile data and use it immediately. Other functions my use avar too and clobber the buffer.




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen