Public Member Functions | Public Attributes

FindCustAttribOwnerDEP Class Reference

Search for all occurrences

#include <mxsCustomAttributes.h>

Inheritance diagram for FindCustAttribOwnerDEP:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  FindCustAttribOwnerDEP (CustAttrib *ca)
int  proc (ReferenceMaker *rmaker)
  This is the method called by system from ReferenceTarget::DoEnumDependentsImpl().

Public Attributes

ReferenceMaker rm
CustAttrib targ_ca

Constructor & Destructor Documentation

FindCustAttribOwnerDEP ( CustAttrib ca ) [inline]
{ rm = NULL; targ_ca = ca; }

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 (rmaker == targ_ca)
            return DEP_ENUM_CONTINUE;

        // russom - 08/27/04 - 579271
        // Make sure we only eval real dependencies.
        // Note: We might need to also add a SKIP for restore class ids, but that
        // is not part of this defect fix.
        if( !rmaker->IsRealDependency(targ_ca) ) 
            return DEP_ENUM_SKIP;

        if (rmaker->ClassID() == CUSTATTRIB_CONTAINER_CLASS_ID )
        {
            ICustAttribContainer* cac = (ICustAttribContainer*)rmaker;
            Animatable* owner = cac->GetOwner();
            if (owner)
            {
                SClass_ID sid = owner->SuperClassID();
                if (sid != MAKEREF_REST_CLASS_ID  && sid != MAXSCRIPT_WRAPPER_CLASS_ID && sid != DELREF_REST_CLASS_ID)
                {
                    for (int j = 0; j < cac->GetNumCustAttribs(); j++)
                    {
                        CustAttrib* ca = cac->GetCustAttrib(j);
                        if (ca == targ_ca)
                        {
                            rm = (ReferenceMaker*)owner;
                            return DEP_ENUM_HALT;
                        }
                    }
                }
            }
        }
        return DEP_ENUM_SKIP; // only need to look at immediate dependents
    }

Member Data Documentation


FindCustAttribOwnerDEP FindCustAttribOwnerDEP FindCustAttribOwnerDEP FindCustAttribOwnerDEP FindCustAttribOwnerDEP FindCustAttribOwnerDEP FindCustAttribOwnerDEP FindCustAttribOwnerDEP FindCustAttribOwnerDEP FindCustAttribOwnerDEP
FindCustAttribOwnerDEP FindCustAttribOwnerDEP FindCustAttribOwnerDEP FindCustAttribOwnerDEP FindCustAttribOwnerDEP FindCustAttribOwnerDEP FindCustAttribOwnerDEP FindCustAttribOwnerDEP FindCustAttribOwnerDEP FindCustAttribOwnerDEP