3ds Max C++ API Reference
Loading...
Searching...
No Matches
FPInterface Class Referenceabstract

#include <ifnpub.h>

+ Inheritance diagram for FPInterface:

Public Member Functions

virtual BaseInterfaceGetInterface (Interface_ID id)
 
virtual FPInterfaceDescGetDesc ()=0
 
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t=0, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPParams *params)
 
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t, FPValue &result, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPValue &result, FPParams *params=NULL)
 
virtual CoreExport FunctionID FindFn (const MCHAR *name)
 
virtual CoreExport BOOL IsEnabled (FunctionID actionID)
 
virtual CoreExport BOOL IsChecked (FunctionID actionID)
 
virtual CoreExport BOOL IsVisible (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsEnabled (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsChecked (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsVisible (FunctionID actionID)
 
virtual ActionTableGetActionTable ()
 
virtual void EnableActions (BOOL onOff)
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor.
 
UtilExport BaseInterfaceGetInterface (Interface_ID id) override
 
virtual UtilExport Interface_ID GetID ()
 
virtual LifetimeType LifetimeControl ()
 
virtual bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=nullptr)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor.
 
virtual UtilExport BaseInterfaceGetInterface (Interface_ID id)
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Static Public Attributes

static CoreExport FPInterfaceDesc nullInterface
 

Protected Member Functions

virtual FPStatus _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p)
 

Additional Inherited Members

- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled }
 
- 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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator.
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator.
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary.
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary.
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc.
 

Detailed Description

See also
Class BaseInterface, Class ClassDesc, Class FPInterfaceDesc, Class Interface_ID, Class ActionTable, FPStatus values, Function Publishing.

Description:
The Function Publishing system makes use of this class. Functions are published in one or more Interfaces by a plug-in. Each interface is represented by an instance of a class derived from this base class.

Note that the Function Publishing class hierarchy is as follows:

FPInterface: This is the base class for all interfaces, the prime client type for using interfaces.

FPInterfaceDesc: This is the class which contains interface metadata.

FPStaticInterface: This is the class to use as the base class for defining static or core virtual interface classes.

FPMixinInterface: This is for use as the base class for defining object-based mixin interface classes, in this case you also use FPInterfaceDesc for mixin interface descriptors.

Member Function Documentation

◆ _dispatch_fn()

virtual FPStatus _dispatch_fn ( FunctionID  fid,
TimeValue  t,
FPValue result,
FPParams p 
)
inlineprotectedvirtual
136{ return FPS_NO_SUCH_FUNCTION; }
#define FPS_NO_SUCH_FUNCTION
The function called does not exist.
Definition: ifnpub.h:102

◆ GetInterface()

virtual BaseInterface * GetInterface ( Interface_ID  id)
inlinevirtual
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 BaseInterface.

Reimplemented in ActionItem, ActionTable, ActionContext, ActionItem, ActionTable, ActionContext, ActionItem, ActionTable, ActionContext, ActionItem, ActionTable, ActionContext, ActionItem, ActionTable, ActionContext, AssetUser, FPInterfaceDesc, FPMixinInterface, INode, IAnimTrack, ITreeView, SimpleManipulator, ITrackBar, MSPluginSimpleManipulator, MSSimpleManipulatorXtnd, PFSimpleAction, PFSimpleActionState, PFSimpleOperator, PFSimpleTest, IXRefAtmospheric, IXRefCtrl, IXRefItem, IXRefMaterial, IXRefObject8, IXRefProxy, IADTCategory, IADTStyle, IMaterialBrowserEntryInfo, INode, UnifiedRenderer, and Interface.

143 {
144 if (id == FPINTERFACE_ID) return this;
145 else if (id == FPINTERFACEDESC_ID) return (BaseInterface*)GetDesc();
146 else return BaseInterface::GetInterface(id);
147 }
Definition: baseinterface.h:78
UtilExport BaseInterface * GetInterface(Interface_ID id) override
virtual FPInterfaceDesc * GetDesc()=0
#define FPINTERFACEDESC_ID
Definition: ifnpub.h:62
#define FPINTERFACE_ID
Definition: ifnpub.h:60

◆ GetDesc()

virtual FPInterfaceDesc * GetDesc ( )
pure virtual
Remarks
Returns a pointer to the class which contains the interface metadata.

Implemented in ActionItem, ActionTable, ActionContext, ActionItem, ActionTable, ActionContext, ActionItem, ActionTable, ActionContext, ActionItem, ActionTable, ActionContext, ActionItem, ActionTable, ActionContext, AssetUser, IBlobMesh, IBrowser, IContainerObject, IEditNormalsMod, EPoly, EPolyMod, FPInterfaceDesc, ILagMod, ILayerControl, ILimitControl, IMorphByBone, INode, INodeExposure, INodeMonitor, INodeTransformMonitor, IBaseWireControl, IParticleObjectExt, IRefTargMonitorClass, ISkinPose, IMeshDeformPWMod, IPatchDeformPWMod, IJiggle, IRotWindup, IPathPosition, IPosConstPosition, IOrientConstRotation, ILookAtConstRotation, ILinkCtrl, IListControl, ISplineIKControl, IAnimTrack, ITreeViewUI, ITreeViewOps, IUnwrapMod, IUnwrapMod2, IUnwrapMod3, IUnwrapMod4, IViewportShaderManager, Plane, GizmoShape, ISimpleManipulator, ITrackBar, IChannelContainer, IMXSParticleContainer, IParticleChannel, IParticleChannelAmountR, IParticleChannelAmountW, IParticleChannelAngAxisR, IParticleChannelAngAxisW, IParticleChannelBoolR, IParticleChannelBoolW, IParticleChannelExt, IParticleChannelExt2, IParticleChannelFloatR, IParticleChannelFloatW, IParticleChannelIDR, IParticleChannelIDW, IParticleChannelINodeR, IParticleChannelINodeW, IParticleChannelINodeHandleR, IParticleChannelINodeHandleW, IParticleChannelIntR, IParticleChannelIntW, IParticleChannelMapR, IParticleChannelMapW, IParticleChannelMatrix3R, IParticleChannelMatrix3W, IParticleChannelMeshR, IParticleChannelMeshW, IParticleChannelMeshMapR, IParticleChannelMeshMapW, IParticleChannelNewR, IParticleChannelNewW, IParticleChannelPoint3R, IParticleChannelPoint3W, IParticleChannelPTVR, IParticleChannelPTVW, IParticleChannelQuatR, IParticleChannelQuatW, IParticleChannelTabTVFaceR, IParticleChannelTabTVFaceW, IParticleChannelTabUVVertR, IParticleChannelTabUVVertW, IParticleChannelTrueFalseIterator, IParticleChannelTrueFalseIterator2, IParticleChannelVoidR, IParticleChannelVoidW, IParticleGroup, IParticleGroupExt, IPFAction, IPFActionExt, IPFActionList, IPFActionListMaterialHolder, IPFActionListPool, IPFActionListSet, IPFActionState, IPFArrow, IPFIntegrator, IPFOperator, IPFOperatorPhysXWorld, IPFRender, IPFSystem, IPFSystemPool, IPFTest, IPFViewport, IPViewItem, IPViewItemCreator, IPViewManager, IPointCloud, IPopulateFlow, RealWorldMapSizeInterface, IScanRenderer2, CheckAbortCallback, XMLAnimTreeEntry, XMLAnimTreeEntryList, NodeAndAnims, IXRefAtmospheric, IXRefCtrl, IXRefItem, IXRefMaterial, IXRefObject8, IObjXRefRecord, IXRefProxy, IMaterialBrowserEntryInfo, IScriptCtrl, IVisualMSForm, IVisualMSItem, IVisualMSCallback, BitmapTex, IPointCache, IPointCacheWSM, and IParticleCache.

◆ Invoke() [1/4]

virtual CoreExport FPStatus Invoke ( FunctionID  fid,
TimeValue  t = 0,
FPParams params = NULL 
)
virtual
Remarks
Parameters:
FunctionID fid

The function ID of the function to invoke.

TimeValue t=0

The timevalue at which to invoke the function.

FPParams* params=NULL

The FPParams to pass.
Returns
The FPStatus. See FPStatus values for details

◆ Invoke() [2/4]

virtual FPStatus Invoke ( FunctionID  fid,
FPParams params 
)
inlinevirtual
Remarks
This method will invoke the specified function.
Parameters:
FunctionID fid

The function ID of the function to invoke.

FPParams* params

The FPParams to pass.
Returns
The FPStatus. See FPStatus values for details
172{ return Invoke(fid, 0, params); }
virtual CoreExport FPStatus Invoke(FunctionID fid, TimeValue t=0, FPParams *params=NULL)

◆ Invoke() [3/4]

virtual CoreExport FPStatus Invoke ( FunctionID  fid,
TimeValue  t,
FPValue result,
FPParams params = NULL 
)
virtual
Remarks
This method will invoke the specified function.
Parameters:
FunctionID fid

The function ID of the function to invoke.

TimeValue t

The timevalue at which to invoke the function.

FPValue& result

A reference to the resulting FPValue.

FPParams* params=NULL

The FPParams to pass.
Returns
The FPStatus. See FPStatus values for details

◆ Invoke() [4/4]

virtual FPStatus Invoke ( FunctionID  fid,
FPValue result,
FPParams params = NULL 
)
inlinevirtual
Remarks
This method will invoke the specified function.
Parameters:
FunctionID fid

The function ID of the function to invoke.

FPValue& result

A reference to the resulting FPValue.

FPParams* params=NULL

The FPParams to pass.
Returns
The FPStatus. See FPStatus values for details
194{ return Invoke(fid, 0, result, params); }

◆ FindFn()

virtual CoreExport FunctionID FindFn ( const MCHAR name)
virtual
Remarks
This method returns a function ID based on the name of the function specified.
Parameters:
MCHAR* name

The name of the function to retrieve the Function ID for.

◆ IsEnabled()

virtual CoreExport BOOL IsEnabled ( FunctionID  actionID)
virtual
Remarks
This method allows you to check whether a specific action function is enabled, in which case the method will return TRUE. If the action function is not enabled FALSE will be returned.
Parameters:
FunctionID actionID

The function ID of the action you wish to check the enabled state for.

◆ IsChecked()

virtual CoreExport BOOL IsChecked ( FunctionID  actionID)
virtual
Remarks
This method allows you to check whether a specific action function is checked, in which case the method will return TRUE. If the action function is not checked FALSE will be returned.
Parameters:
FunctionID actionID

The function ID of the action you wish to check the checked state for.

◆ IsVisible()

virtual CoreExport BOOL IsVisible ( FunctionID  actionID)
virtual
Remarks
This method allows you to check whether a specific action function is visible, in which case the method will return TRUE. If the action function is not visible FALSE will be returned.
Parameters:
FunctionID actionID

The function ID of the action you wish to check the visibility state for.

◆ GetIsEnabled()

virtual CoreExport FunctionID GetIsEnabled ( FunctionID  actionID)
virtual
Remarks
This method will return the isEnabled ID for the specified action function.
Parameters:
FunctionID actionID

The function ID of the action you wish to get the isEnabled ID for.

◆ GetIsChecked()

virtual CoreExport FunctionID GetIsChecked ( FunctionID  actionID)
virtual
Remarks
This method will return the isChecked ID for the specified action function.
Parameters:
FunctionID actionID

The function ID of the action you wish to get the isChecked ID for.

◆ GetIsVisible()

virtual CoreExport FunctionID GetIsVisible ( FunctionID  actionID)
virtual
Remarks
This method will return the isVisible ID for the specified action function.
Parameters:
FunctionID actionID

The function ID of the action you wish to get the isVisible ID for.

◆ GetActionTable()

virtual ActionTable * GetActionTable ( )
inlinevirtual
Remarks
This method returns a pointer to the ActionTable.
Default Implementation:
{ return NULL; }

Reimplemented in FPInterfaceDesc.

248{ return NULL; }
#define NULL
Definition: autoptr.h:18

◆ EnableActions()

virtual void EnableActions ( BOOL  onOff)
inlinevirtual
Remarks
This method allows you to enable or disable the entire set of actions in the interface You might want to use this method if the actions are only to be active during certain periods in the running of 3ds Max. Usually, this control is achieved via ActionTable contexts.
Parameters:
BOOL onOff

TRUE to enable actions, FALSE to disable them.
Default Implementation:
{ }

Reimplemented in FPInterfaceDesc.

259{ UNUSED_PARAM(onOff); }
#define UNUSED_PARAM(x)
Definition: BuildWarnings.h:18

Member Data Documentation

◆ nullInterface

CoreExport FPInterfaceDesc nullInterface
static