Public Member Functions

IRefTargMonitor Class Reference

Search for all occurrences

Detailed Description

The interface for an owner of a RefTargMonitorRefMaker class.

The owner of a RefTargMonitorRefMaker instance must implement this interface. Messages from the RefTargMonitorRefMaker instance are passed to the owner through this interface.

See also:
RefTargMonitorRefMaker, IIndirectReferenceMaker

#include <IRefTargMonitor.h>

Inheritance diagram for IRefTargMonitor:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual RefResult  ProcessRefTargMonitorMsg (Interval changeInt, RefTargetHandle hTarget, PartID &partID, RefMessage message, bool fromMonitoredTarget)=0
  Calls to the RefTargMonitorRefMaker instance's NotifyRefChanged method are passed to its owner through this method.
virtual int  ProcessEnumDependents (DependentEnumProc *dep)=0
  Calls to the RefTargMonitorRefMaker instance's DoEnumDependents method are passed to its owner through this method.

Member Function Documentation

virtual RefResult ProcessRefTargMonitorMsg ( Interval  changeInt,
RefTargetHandle  hTarget,
PartID partID,
RefMessage  message,
bool  fromMonitoredTarget 
) [pure virtual]

Calls to the RefTargMonitorRefMaker instance's NotifyRefChanged method are passed to its owner through this method.

The RefTargMonitorRefMaker owner is responsible for ensuring that an infinite recursion of message passing does not occur. Typically the owner would set a flag while propogating a message, and not propogate a new message if that flag is set.

Since the owner doesn't hold a reference to the RefTargMonitorRefMaker's watched object, the watched object may not be saved or loaded when the owner is saved or loaded. The owner must handle this case. Typically, the owner would also derive from IIndirectReferenceMaker, which will result in the watched object being saved and loaded. For an example, see the NodeTransformMonitor class in maxsdk\samples\controllers\nodetransformmonitor.cpp.

The arguments to this method, other than fromMonitoredTarget, correspond to the arguments of ReferenceMaker::NotifyRefChanged.

Parameters:
changeInt - This is the interval of time over which the message is active.
hTarget - This is the handle of the reference target the message was sent by.
partID - This contains information specific to the message passed in.
message - The message which needs to be handled.
fromMonitoredTarget - true if message orginated from RefTargMonitorRefMaker's monitored target.
Returns:
Typically REF_SUCCEED indicating the message was processed.
virtual int ProcessEnumDependents ( DependentEnumProc dep ) [pure virtual]

Calls to the RefTargMonitorRefMaker instance's DoEnumDependents method are passed to its owner through this method.

The RefTargMonitorRefMaker owner is responsible for ensuring that an infinite recursion does not occur. Typically the owner would set a flag while enumerating dependents, and not start a new enumeration if that flag is set.

Parameters:
dep - the DependentEnumProc.
Returns:
1 to stop the enumeration and 0 to continue.

IRefTargMonitor IRefTargMonitor IRefTargMonitor IRefTargMonitor IRefTargMonitor IRefTargMonitor IRefTargMonitor IRefTargMonitor IRefTargMonitor IRefTargMonitor
IRefTargMonitor IRefTargMonitor IRefTargMonitor IRefTargMonitor IRefTargMonitor IRefTargMonitor IRefTargMonitor IRefTargMonitor IRefTargMonitor IRefTargMonitor