Public Member Functions | Protected Member Functions | Friends

DependentEnumProc Class Reference

Search for all occurrences

Detailed Description

A callback class for enumerating dependents.

This class is a callback object for the ReferenceMaker::DoEnumDependentsImpl() and ReferenceMaker::DoEnumDependents() methods. The proc() method is called by the system.

#include <ref.h>

Inheritance diagram for DependentEnumProc:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual int  proc (ReferenceMaker *rmaker)=0
  This is the method called by system from ReferenceTarget::DoEnumDependentsImpl().
CoreExport bool  CheckIfAndSetAsVisited (ReferenceMaker *rmaker)
  This method sets and checks whether a ReferenceMaker was visited.

Protected Member Functions

CoreExport  DependentEnumProc ()
virtual CoreExport  ~DependentEnumProc ()
  DependentEnumProc (const DependentEnumProc &)
DependentEnumProc operator= (const DependentEnumProc &rhs)

Friends

class  ReferenceTarget
class  ReferenceMaker

Constructor & Destructor Documentation

CoreExport DependentEnumProc ( ) [protected]
virtual CoreExport ~DependentEnumProc ( ) [protected, virtual]
DependentEnumProc ( const DependentEnumProc ) [protected]

Member Function Documentation

DependentEnumProc& operator= ( const DependentEnumProc rhs ) [protected]
virtual int proc ( ReferenceMaker rmaker ) [pure 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)

Implemented in FindMAXWrapperEnum, and FindCustAttribOwnerDEP.

CoreExport bool CheckIfAndSetAsVisited ( ReferenceMaker rmaker )

This method sets and checks whether a ReferenceMaker was visited.

This method is used to check whether a ReferenceMaker was previously visited by this callback object, and registers it as having been visited if not. This is used to only call the proc on each ReferenceMaker once. If you override ReferenceTarget::EnumDependentsImp, you should use this method to process your instance only if it was not previously visited.

Parameters:
rmaker - A pointer to the reference maker
Returns:
Returns true of the rmaker was previously visited, false if not.
See also:
ReferenceTarget::DoEnumDependentsImpl(DependentEnumProc* dep)

Friends And Related Function Documentation

friend class ReferenceTarget [friend]
friend class ReferenceMaker [friend]

DependentEnumProc DependentEnumProc DependentEnumProc DependentEnumProc DependentEnumProc DependentEnumProc DependentEnumProc DependentEnumProc DependentEnumProc DependentEnumProc
DependentEnumProc DependentEnumProc DependentEnumProc DependentEnumProc DependentEnumProc DependentEnumProc DependentEnumProc DependentEnumProc DependentEnumProc DependentEnumProc