Public Types | Public Member Functions

CAssertCB Class Reference

This reference page is linked to from the following overview topics: Incremental Improvements.


Search for all occurrences

Detailed Description

Callback class that allows for hooking into 3ds Max's assertion mechanims.

Plugins can derive from this class and overwrite the CAssertCB::AssertEx method if they wish to execute a custom action, such as logging, when an assertion fails during execution of 3ds Max. See CAssertCB::AssertResult for more information on the customization options this callback mechanism offers.

#include <assert1.h>

Inheritance diagram for CAssertCB:
Inheritance graph
[legend]

List of all members.

Public Types

enum   AssertResult { ASSERTCB_IGNORE, ASSERTCB_CANCEL, ASSERTCB_CONTINUE }
 

Possible return values for callback method (CAssertCB::AssertEx) invoked when an assertion fails.

More...

Public Member Functions

virtual AssertResult  AssertEx (int line, char *file, char *function=NULL, char *expression=NULL)=0
  Callback method invoked when an assertion fails.

Member Enumeration Documentation

Possible return values for callback method (CAssertCB::AssertEx) invoked when an assertion fails.

Enumerator:
ASSERTCB_IGNORE 

Ignore the assertion and continue.

No assertion dialog is displayed.

ASSERTCB_CANCEL 

Cancel the execution.

3ds Max will be exit.

ASSERTCB_CONTINUE 

Proceed with the built in handling of the assertion (display assert dialog)


Member Function Documentation

virtual AssertResult AssertEx ( int  line,
char *  file,
char *  function = NULL,
char *  expression = NULL 
) [pure virtual]

Callback method invoked when an assertion fails.

Parameters:
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
expression - the expression that was asserted
Returns:
One of the possible AssertResult values.

CAssertCB CAssertCB CAssertCB CAssertCB CAssertCB CAssertCB CAssertCB CAssertCB CAssertCB CAssertCB
CAssertCB CAssertCB CAssertCB CAssertCB CAssertCB CAssertCB CAssertCB CAssertCB CAssertCB CAssertCB