FPMixinInterface Class Reference
 
 
 
FPMixinInterface Class Reference

#include <ifnpub.h>

Inheritance diagram for FPMixinInterface:
FPInterface BaseInterface InterfaceServer MaxHeapOperators ActionItem ActionTable BitmapTex CheckAbortCallback EPoly EPolyMod ExposureMaterialControl GizmoShape IADTCategory IADTStyle IAnimTrack IAssembly IBaseWireControl IBatchRenderView IBlobMesh IBlockRefComponent IBrowser IChannelContainer IContainerObject IDaylightSystem IDxMaterial IEditNormalsMod IJiggle ILagMod ILayerControl ILayerDisplayProperties ILayerProperties ILimitControl ILinkCtrl IListControl ILookAtConstRotation ILookatControl_Extension ILuminaire IMenu IMenuItem IMeshDeformPWMod IMorphByBone IMXSParticleContainer INode INodeBakeProjProperties INodeBakeProperties INodeDisplayProperties INodeExposure INodeGIProperties INodeLayerProperties INodeMentalRayProperties INodeMonitor INodeShadingProperties INodeTransformMonitor IObjXRefRecord IOrientConstRotation IParticleCache IParticleChannel IParticleChannelAmountR IParticleChannelAmountW IParticleChannelAngAxisR IParticleChannelAngAxisW IParticleChannelBoolR IParticleChannelBoolW IParticleChannelExt IParticleChannelExt2 IParticleChannelFloatR IParticleChannelFloatW IParticleChannelIDR IParticleChannelIDW IParticleChannelINodeHandleR IParticleChannelINodeHandleW IParticleChannelINodeR IParticleChannelINodeW IParticleChannelIntR IParticleChannelIntW IParticleChannelMapR IParticleChannelMapW IParticleChannelMatrix3R IParticleChannelMatrix3W IParticleChannelMeshMapR IParticleChannelMeshMapW IParticleChannelMeshR IParticleChannelMeshW IParticleChannelNewR IParticleChannelNewW IParticleChannelPoint3R IParticleChannelPoint3W IParticleChannelPTVR IParticleChannelPTVW IParticleChannelQuatR IParticleChannelQuatW IParticleChannelTabTVFaceR IParticleChannelTabTVFaceW IParticleChannelTabUVVertR IParticleChannelTabUVVertW IParticleChannelTrueFalseIterator IParticleChannelTrueFalseIterator2 IParticleChannelVoidR IParticleChannelVoidW IParticleGroup IParticleGroupExt IParticleObjectExt IPatchDeformPWMod IPathPosition IPFAction IPFActionExt IPFActionList IPFActionListMaterialHolder IPFActionListPool IPFActionListSet IPFActionState IPFArrow IPFIntegrator IPFOperator IPFOperatorPhysXWorld IPFRender IPFSystem IPFSystemPool IPFTest IPFViewport IPointCache IPointCacheWSM IPosConstPosition IProjectionMod IProjectionMod10 IPViewItem IPViewItemCreator IPViewManager IQuadMenu IRefTargMonitorClass IRenderElementMgr IRotWindup IScanRenderer2 IScriptCtrl ISimpleFaceDataChannel ISimpleManipulator ISkinPose ISplineIKControl ITrackBar ITreeViewOps ITreeViewUI IUnwrapMod IUnwrapMod2 IUnwrapMod3 IUnwrapMod4 IVertexPaint IViewportShaderManager IVisualMSCallback IVisualMSForm IVisualMSItem IXRefAtmospheric IXRefCtrl IXRefItem IXRefMaterial IXRefObject8 IXRefProxy AssetUser IViewportViewSetting NodeAndAnims Plane RadiosityMesh RealWorldMapSizeInterface XMLAnimTreeEntry XMLAnimTreeEntryList

Class Description

See also:
Class FPInterface, Class FPInterfaceDesc, Function publishing.

Description:
A "Mixin" interface provides a way for a plug-in to expose some of its functionality for use by other plug-ins or MAXScript. The notion of "Mixin" refers to the idea that the interface is a sub-class of the plug-in class and thus "mixed in" with it. Many classes in the SDK now inherit from FPMixinInterface in order to expose some of their functionality.

Developers should see the documentation for Class FPInterface for reference on this class as well.

For an overview of the function publishing system as a whole, see Function publishing.

Public Member Functions

  FPMixinInterface ()
virtual LifetimeType  LifetimeControl ()
virtual CoreExport bool  RegisterNotifyCallback (InterfaceNotifyCallback *incb)
virtual void  UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
CoreExport  ~FPMixinInterface ()
virtual BaseInterface GetInterface (Interface_ID id)
virtual FPInterfaceDesc GetDescByID (Interface_ID id)
virtual Interface_ID  GetID ()

Protected Member Functions

  FPMixinInterface (const FPMixinInterface &rhs)
FPMixinInterface operator= (const FPMixinInterface &rhs)

Protected Attributes

Tab< InterfaceNotifyCallback * > *  interfaceNotifyCBs

Friends

class  FPMixinInterfaceValue

Constructor & Destructor Documentation

FPMixinInterface ( const FPMixinInterface rhs ) [inline, protected]
: MXS_fpi(NULL), interfaceNotifyCBs(NULL) { UNUSED_PARAM(rhs); }
FPMixinInterface ( ) [inline]
: MXS_fpi(NULL), interfaceNotifyCBs(NULL) {}
CoreExport ~FPMixinInterface ( )

Member Function Documentation

FPMixinInterface& operator= ( const FPMixinInterface rhs ) [inline, protected]
{ UNUSED_PARAM(rhs); return *this;}
virtual LifetimeType LifetimeControl ( ) [inline, virtual]
Remarks:
This method allows inquiries into the actual lifetime policy of a client and provide a server-controlled delete notify callback.
Returns:
One of the following LifetimeTypes:

noRelease

Do not call release, use interface as long as you like.

immediateRelease

The interface is only good for one calls. The release is implied so a call to release is not required.

wantsRelease

The clients are controlling the lifetime, so the interface needs a Release() when the client has finished. This is the default.

serverControlled

The server controls the lifetime and will use the InterfaceNotifyCallback to inform the code when it is gone.
Default Implementation:
{ return noRelease; }

Reimplemented from BaseInterface.

Reimplemented in AssetUser, Plane, GizmoShape, XMLAnimTreeEntry, XMLAnimTreeEntryList, and NodeAndAnims.

{ return serverControlled; }
virtual CoreExport bool RegisterNotifyCallback ( InterfaceNotifyCallback incb ) [virtual]
Remarks:
This method allows you to register an interface notify callback.
Parameters:
InterfaceNotifyCallback* incb

A pointer to the interface notify callback.
Default Implementation:
{ return false; }

Reimplemented from BaseInterface.

virtual void UnRegisterNotifyCallback ( InterfaceNotifyCallback incb ) [inline, virtual]
Remarks:
This method allows you to un-register an interface notify callback.
Parameters:
InterfaceNotifyCallback incb

A pointer to the interface notify callback.
Default Implementation:
{ }

Reimplemented from BaseInterface.

        { 
                if (interfaceNotifyCBs)
                        for (int i=0; i < interfaceNotifyCBs->Count(); i++)
                        {       if (incb == (*interfaceNotifyCBs)[i])
                                        interfaceNotifyCBs->Delete(i,1);
                        }
        }
virtual BaseInterface* GetInterface ( Interface_ID  id ) [inline, virtual]
Remarks:
Returns a pointer to the interface whose ID is specified.
Parameters:
Interface_ID id

The ID of the interface to return.
Default Implementation:
{ return NULL; }

Reimplemented from FPInterface.

Reimplemented in ActionItem, ActionItemStandin, ActionTable, AssetUser, INode, ITreeView, SimpleManipulator, ITrackBar, PFSimpleAction, PFSimpleActionState, PFSimpleOperator, and PFSimpleTest.

{ if (id == FPMIXININTERFACE_ID) return this; else return FPInterface::GetInterface(id); }
virtual FPInterfaceDesc* GetDescByID ( Interface_ID  id ) [inline, virtual]
Remarks:
This method is used to directly implement FPInterface::GetDesc() in your public virtual base mixin class, like this;

FPInterfaceDesc* GetDesc() { return GetDescByID(THIS_INTERFACE_ID); }

Then implement a GetDescByID() in the implementing class to avoid link export issues.
Parameters:
Interface_ID id

The unique interface ID by which to get the FPInterfaceDesc.
Default Implementation:
{ return &nullInterface; }

Reimplemented in ActionItem, ActionTable, and AssetUser.

{ UNUSED_PARAM(id); return &nullInterface; }
virtual Interface_ID GetID ( ) [inline, virtual]
Remarks:
This method overrides GetID() in those interfaces that do not publish metadata but instead have a unique Interface_ID for quick internal identification in implementation code that might be shared by a bunch of mixin interfaces.
Returns:
The Interface_ID.
Default Implementation:
{ return GetDesc()->ID; }

Reimplemented from BaseInterface.

Reimplemented in ActionItem, ActionTable, AssetUser, IDaylightSystem2, INodeMonitor, INodeTransformMonitor, IRefTargMonitorClass, ILookatControl_Extension, ITreeViewUI, ITreeViewOps, IXRefAtmospheric, IXRefCtrl, IXRefItem, IXRefMaterial, IXRefObject8, IObjXRefRecord, and IXRefProxy.

{ return GetDesc()->ID; }

Friends And Related Function Documentation

friend class FPMixinInterfaceValue [friend]

Member Data Documentation