3ds Max C++ API Reference
|
#include "buildver.h"
#include "utilexp.h"
#include "maxheap.h"
#include "strbasic.h"
#include <tchar.h>
Classes | |
class | CAssertCB |
Callback class that allows for hooking into 3ds Max's assertion mechanism. More... | |
Macros | |
#define | assert(expr) ((void *)0) |
#define | DbgAssert(expr) |
#define | DbgAssertMsg(expr, msg) |
#define | DbgVerify(expr) ( expr ) |
Functions | |
UtilExport int | assert1 (int line, const char *file, const char *function=NULL, const char *expr=NULL) |
Method to be called to signal a violation of some assumption in the code. | |
UtilExport int | assert1 (int line, const wchar_t *file, const wchar_t *function=NULL, const wchar_t *expr=NULL) |
UtilExport int | assert1 (int line, const wchar_t *file, const char *function=NULL, const wchar_t *expr=NULL) |
UtilExport CAssertCB * | SetAssertCB (CAssertCB *cb) |
Sets a callback object that allows for performing a custom action when an assertion fails (is triggered). | |
UtilExport int assert1 | ( | int | line, |
const char * | file, | ||
const char * | function = NULL , |
||
const char * | expr = NULL |
||
) |
Method to be called to signal a violation of some assumption in the code.
This method should not be called directly, but rather via the various assertion macros such as DbgAssert, MaxAssert, DbgVerify, etc.
line | - the line number where the assertion occurred |
file | - the file path and name where the assertion occurred |
function | - the non-decorated name of the function in which the assertion occurred |
expr | - the expression that was asserted |
UtilExport int assert1 | ( | int | line, |
const wchar_t * | file, | ||
const wchar_t * | function = NULL , |
||
const wchar_t * | expr = NULL |
||
) |
UtilExport int assert1 | ( | int | line, |
const wchar_t * | file, | ||
const char * | function = NULL , |
||
const wchar_t * | expr = NULL |
||
) |
UtilExport CAssertCB * SetAssertCB | ( | CAssertCB * | cb | ) |
Sets a callback object that allows for performing a custom action when an assertion fails (is triggered).
A plugin can supply an object that allows for executing a custom action when an assertion fails in 3ds Max. For details on the extent of possible customization see class CAssertCB. Currently, only one callback object can be active at any given time. This means that the callback installed by a plugin can be de-installed by another plugin. Thus, plugins should keep their callbacks active for as short of a time period as possible, and restore the previous callback object when they de-activate their own.
cb | - The new callback object to use |