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

#include <modstack.h>

+ Inheritance diagram for NotifyCollapseEnumProc:

Public Member Functions

 NotifyCollapseEnumProc (bool preCollapse, INode *n, Object *collapsedObj=NULL)
 
virtual PipeEnumResult proc (ReferenceTarget *object, IDerivedObject *derObj, int index)
 
virtual PipeEnumResult proc (ReferenceTarget *object, IDerivedObject *derObj, int index)=0
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor.
 
virtual UtilExport BaseInterfaceGetInterface (Interface_ID id)
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

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.
 

Detailed Description

See also
Class GeomPipelineEnumProc, Class BaseObject, Class Object, Class IDerivedObject.

Description:
Whenever the modifier stack is collapsed the code has to notify all objects in the stack with a Pre and a Post notification. In order to do this, this class can be used in conjunction with the method EnumGeomPipleine(). In the constructor one can specify, if it is a pre- or post- collapse notification. In case it is a post collapse the object that represents the result of the collapse has to be provided as well. The INode pointer to the beginning of the pipeline that was collapsed has to be provided in both cases.

All methods of this class are implemented by the System.

Constructor & Destructor Documentation

◆ NotifyCollapseEnumProc()

NotifyCollapseEnumProc ( bool  preCollapse,
INode n,
Object collapsedObj = NULL 
)
inline
Remarks
Constructor. The private data members are initialized by the passed parameters.
Parameters:
bool preCollapse

Indicates if this is a pre- collapse or a post- collapse. Pass true for pre and false for post.

INode *n

Points to the node at the beginning of the pipeline that was collapsed.

Object *collapsedObj = NULL

If this is a post- collapse then points to the object which is the result of the collapse.
Sample Code:
The following code fragment shows using this constructor and then the EnumGeomPipeline with this object:

NotifyCollapseEnumProc PreNCEP(true,node);

EnumGeomPipeline(&PreNCEP,node);
313: bPreCollapse(preCollapse), node(n), collapsedObject(collapsedObj) {}

Member Function Documentation

◆ proc()

virtual PipeEnumResult proc ( ReferenceTarget object,
IDerivedObject derObj,
int  index 
)
inlinevirtual
Remarks
This is the implementation of the EnumGeomPipeline callback method proc() which calls BaseObject::NotifyPreCollapse or BaseObject::NotifyPostCollapse as required.

Implements GeomPipelineEnumProc.

317 {
318 if(object->ClassID() == Class_ID(BASENODE_CLASS_ID,0))
319 return PIPE_ENUM_CONTINUE;
320
321 if(bPreCollapse)
322 ((BaseObject *) object)->NotifyPreCollapse(node, derObj, index);
323 else
324 ((BaseObject *) object)->NotifyPostCollapse(node, collapsedObject, derObj, index);
325
326 return PIPE_ENUM_CONTINUE;
327 }
virtual CoreExport Class_ID ClassID()
Retrieves a constant that uniquely identifies the plugin class.
This is the base class for objects and modifiers.
Definition: object.h:529
Definition: maxtypes.h:67
#define BASENODE_CLASS_ID
Definition: plugapi.h:413
@ PIPE_ENUM_CONTINUE
Definition: modstack.h:152