Public Member Functions | Public Attributes

FindMAXWrapperEnum Class Reference

Search for all occurrences

#include <mxsobjects.h>

Inheritance diagram for FindMAXWrapperEnum:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  FindMAXWrapperEnum (ReferenceTarget *ref, ValueMetaClass *tag, bool(*finalCheckProc)(MAXWrapper *, void *)=NULL, void *arg=NULL)
int  proc (ReferenceMaker *rm)
  This is the method called by system from ReferenceTarget::DoEnumDependentsImpl().

Public Attributes

Value result

Constructor & Destructor Documentation

FindMAXWrapperEnum ( ReferenceTarget ref,
ValueMetaClass tag,
bool(*)(MAXWrapper *, void *)  finalCheckProc = NULL,
void *  arg = NULL 
) [inline]
    {
        mytag = tag;
        myref = ref;
        result = NULL;
        this->finalCheckProc = finalCheckProc;
        this->arg = arg;
    }

Member Function Documentation

int proc ( ReferenceMaker rmaker ) [inline, virtual]

This is the method called by system from ReferenceTarget::DoEnumDependentsImpl().

Parameters:
rmaker - A pointer to the reference maker
Returns:
One of the following values:
  • DEP_ENUM_CONTINUE: This continues the enumeration
  • DEP_ENUM_HALT: This stops the enumeration.
  • DEP_ENUM_SKIP: Reference Targets can have multiple Reference Makers (dependents). In certain instances when DoEnumDependents() is used to enumerate them you may not want to travel up all of the "branches". By returning DEP_ENUM_SKIP from this method you tell the enumerator to not enumerate the current Reference Maker's dependents but not to halt the enumeration completely.
See also:
ReferenceTarget::DoEnumDependentsImpl(DependentEnumProc* dep)
ReferenceTarget::DoEnumDependents(DependentEnumProc* dep)

Implements DependentEnumProc.

    {
        if (rm == myref) 
            return DEP_ENUM_CONTINUE;
        if (rm->SuperClassID() == MAXSCRIPT_WRAPPER_CLASS_ID && 
            ((MAXWrapper*)rm)->tag == mytag &&
            rm->NumRefs() && rm->GetReference(0) == myref &&
            (finalCheckProc == NULL || (*finalCheckProc)((MAXWrapper*)rm, arg))
            ) 
        {
            result = (MAXWrapper*)rm;
            return DEP_ENUM_HALT;
        }
        return DEP_ENUM_SKIP; // just look at direct dependents
    }

Member Data Documentation


FindMAXWrapperEnum FindMAXWrapperEnum FindMAXWrapperEnum FindMAXWrapperEnum FindMAXWrapperEnum FindMAXWrapperEnum FindMAXWrapperEnum FindMAXWrapperEnum FindMAXWrapperEnum FindMAXWrapperEnum
FindMAXWrapperEnum FindMAXWrapperEnum FindMAXWrapperEnum FindMAXWrapperEnum FindMAXWrapperEnum FindMAXWrapperEnum FindMAXWrapperEnum FindMAXWrapperEnum FindMAXWrapperEnum FindMAXWrapperEnum