3ds Max C++ API Reference
FindCustAttribOwnerDEP Class Reference

#include <mxsCustomAttributes.h>

+ Inheritance diagram for FindCustAttribOwnerDEP:

Public Member Functions

 FindCustAttribOwnerDEP (CustAttrib *ca)
 
int proc (ReferenceMaker *rmaker)
 This is the method called by system from ReferenceTarget::DoEnumDependentsImpl(). More...
 
- Public Member Functions inherited from DependentEnumProc
CoreExport bool CheckIfAndSetAsVisited (ReferenceMaker *rmaker)
 This method sets and checks whether a ReferenceMaker was visited. More...
 

Public Attributes

ReferenceMakerrm
 
CustAttribtarg_ca
 

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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 
- Protected Member Functions inherited from DependentEnumProc
CoreExport DependentEnumProc ()
 
virtual CoreExport ~DependentEnumProc ()
 
 DependentEnumProc (const DependentEnumProc &)
 
DependentEnumProcoperator= (const DependentEnumProc &rhs)
 

Constructor & Destructor Documentation

◆ FindCustAttribOwnerDEP()

216 { rm = NULL; targ_ca = ca; }
#define NULL
Definition: autoptr.h:18
CustAttrib * targ_ca
Definition: mxsCustomAttributes.h:215
ReferenceMaker * rm
Definition: mxsCustomAttributes.h:214

Member Function Documentation

◆ proc()

int proc ( ReferenceMaker rmaker)
inlinevirtual

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.

218  {
219  if (rmaker == targ_ca)
220  return DEP_ENUM_CONTINUE;
221 
222  // russom - 08/27/04 - 579271
223  // Make sure we only eval real dependencies.
224  // Note: We might need to also add a SKIP for restore class ids, but that
225  // is not part of this defect fix.
226  if( !rmaker->IsRealDependency(targ_ca) )
227  return DEP_ENUM_SKIP;
228 
229  if (rmaker->ClassID() == CUSTATTRIB_CONTAINER_CLASS_ID )
230  {
232  Animatable* owner = cac->GetOwner();
233  if (owner)
234  {
235  SClass_ID sid = owner->SuperClassID();
237  {
238  for (int j = 0; j < cac->GetNumCustAttribs(); j++)
239  {
240  CustAttrib* ca = cac->GetCustAttrib(j);
241  if (ca == targ_ca)
242  {
243  rm = (ReferenceMaker*)owner;
244  return DEP_ENUM_HALT;
245  }
246  }
247  }
248  }
249  }
250  return DEP_ENUM_SKIP; // only need to look at immediate dependents
251  }
Definition: Animatable.h:118
virtual CoreExport SClass_ID SuperClassID()=0
Retrieves a constant representing the type of the plugin.
virtual CoreExport Class_ID ClassID()
Retrieves a constant that uniquely identifies the plugin class.
Definition: custattrib.h:33
Definition: icustattribcontainer.h:26
virtual Animatable * GetOwner()=0
virtual int GetNumCustAttribs()=0
virtual CustAttrib * GetCustAttrib(int i)=0
A scene entity that owns other scene entities and listens to messages from them.
Definition: ref.h:1155
virtual BOOL IsRealDependency(ReferenceTarget *rtarg)
Returns whether this is a "real" (strong) dependency or not.
Definition: ref.h:1677
#define CUSTATTRIB_CONTAINER_CLASS_ID
Definition: plugapi.h:539
#define DELREF_REST_CLASS_ID
Definition: plugapi.h:398
#define MAKEREF_REST_CLASS_ID
Definition: plugapi.h:397
#define MAXSCRIPT_WRAPPER_CLASS_ID
Definition: plugapi.h:395
ulong SClass_ID
Definition: maxtypes.h:116
#define DEP_ENUM_CONTINUE
Halts enumeration.
Definition: ref.h:977
#define DEP_ENUM_HALT
Halts enumeration.
Definition: ref.h:979
#define DEP_ENUM_SKIP
Skip enumeration.
Definition: ref.h:981

Member Data Documentation

◆ rm

◆ targ_ca

CustAttrib* targ_ca