This reference page is linked to from the following overview topics: Plug-in Upgrade Guide, Reference Hierarchy Functions.
Iterates through all direct dependents of a given ReferenceTarget.
Client code can simply instantiate an object of this type with the ReferenceTarget instance whose direct dependents need to be iterated on. Calling method DependentIterator::Next() will return the next ReferenceMaker that depends on the given ReferenceTarget. For instance, you can count the number of ReferenceMakers that depend on a ReferenceTarget using the following code:
int CountRefs(ReferenceTarget *rt) {
DependentIterator di(rt);
int nrefs = 0;
ReferenceMaker* rm = NULL;
while (NULL!=(rm=di.Next())) {
nrefs++;
}
return nrefs;
}
All methods of this class are implemented by the system.
#include <ref.h>

Public Member Functions |
|
| CoreExport | DependentIterator (ReferenceTarget *rtarg) |
| Constructor. |
|
| CoreExport | ~DependentIterator () |
| Destructor. |
|
| CoreExport ReferenceMaker * | Next () |
| Returns a pointer to the next
ReferenceMaker or NULL when there are no more. |
|
| CoreExport void | Reset () |
| Resets the iterator object so it starts at
the beginning again with the original
ReferenceTarget passed. |
|
| CoreExport DependentIterator | ( | ReferenceTarget * | rtarg | ) |
Constructor.
| rtarg | - Points to the RefereceTarget whose dependents are iterated through. |
| CoreExport ~DependentIterator | ( | ) |
Destructor.
| CoreExport ReferenceMaker* Next | ( | ) |
Returns a pointer to the next ReferenceMaker or NULL when there are no more.
| CoreExport void Reset | ( | ) |
Resets the iterator object so it starts at the beginning again with the original ReferenceTarget passed.