3ds Max C++ API Reference
Loading...
Searching...
No Matches
SuspendDirtyNotificationCounting Class Reference

Suspends counting of dirty notifications in an exception safe manner. More...

#include <C:/adskgit/3dsmax/3dsmax/3dswin/src/maxsdk/include/SuspendDirtyNotificationCounting.h>

Inheritance diagram for SuspendDirtyNotificationCounting:

Public Member Functions

UtilExport SuspendDirtyNotificationCounting (const char *eventName, bool suspend=true)
 Constructor.
UtilExport SuspendDirtyNotificationCounting (const wchar_t *eventName, bool suspend=true)
UtilExport void Resume ()
 Restores mode to its initial state.
UtilExport ~SuspendDirtyNotificationCounting ()
 Destructor - restores mode to its initial state.

Friends

void ScripterExport DirtyNotificationCounting_Suspend (SuspendDirtyNotificationCounting &guard)
void ScripterExport DirtyNotificationCounting_Resume (SuspendDirtyNotificationCounting &guard)

Additional Inherited Members

Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown.
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned.
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown.
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown.
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned.
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown.
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned.
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects.
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown.
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen.
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen.
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen.
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown.
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen.
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen.
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator.
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator.
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary.
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary.
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc.
static UtilExport voidmalloc_nullchecked (size_t size)
 Allocates memory via malloc without invoking 3dsmax's out of memory handler with potential CER.
static UtilExport voidcalloc_nullchecked (size_t num, size_t size)
 Allocates memory via calloc without invoking 3dsmax's out of memory handler with potential CER.
static UtilExport voidrealloc_nullchecked (void *memblock, size_t size)
 Reallocates memory via realloc without invoking 3dsmax's out of memory handler with potential CER.
static UtilExport voidLocalAlloc_nullchecked (unsigned int uFlags, size_t size)
 Allocates memory via LocalAlloc without invoking 3dsmax's out of memory handler with potential CER.
Protected Member Functions inherited from Noncopyable
 Noncopyable ()=default
 ~Noncopyable ()=default

Detailed Description

Suspends counting of dirty notifications in an exception safe manner.

While a maxscript or python script is running, the number of REFMSG_CHANGE notifications is counted. We don't want to count such notifications occurring during operations such as scene file load, save, import or export unless those notifications are a result of scripts executed as part of those operations. That is, if a script performs a file load we don't want to count the dirty notifications occurring during that file load, except those that may occur in a scripted callback. If the file load is performed outside of a script, we don't want to count those notifications, except those that may occur in a scripted callback.

Constructor & Destructor Documentation

◆ SuspendDirtyNotificationCounting() [1/2]

UtilExport SuspendDirtyNotificationCounting ( const char * eventName,
bool suspend = true )

Constructor.

Suspends counting of dirty notifications that occur while a script is running.

Parameters
[in]eventNameThe name of the event for which dirty notification counting is being suspended.
[in]suspendIf true, suspends counting. If false, does nothing.

◆ SuspendDirtyNotificationCounting() [2/2]

UtilExport SuspendDirtyNotificationCounting ( const wchar_t * eventName,
bool suspend = true )

◆ ~SuspendDirtyNotificationCounting()

Destructor - restores mode to its initial state.

Member Function Documentation

◆ Resume()

UtilExport void Resume ( )

Restores mode to its initial state.

◆ DirtyNotificationCounting_Suspend

void ScripterExport DirtyNotificationCounting_Suspend ( SuspendDirtyNotificationCounting & guard)
friend

◆ DirtyNotificationCounting_Resume

void ScripterExport DirtyNotificationCounting_Resume ( SuspendDirtyNotificationCounting & guard)
friend