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

#include <ifnpub.h>

+ Inheritance diagram for FPMixinInterface:

Public Member Functions

 FPMixinInterface ()
 
virtual LifetimeType LifetimeControl ()
 
virtual CoreExport bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
CoreExport ~FPMixinInterface ()
 
virtual BaseInterfaceGetInterface (Interface_ID id)
 
virtual FPInterfaceDescGetDescByID (Interface_ID id)
 
virtual Interface_ID GetID ()
 
- Public Member Functions inherited from FPInterface
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 ()
 

Protected Member Functions

 FPMixinInterface (const FPMixinInterface &rhs)
 
FPMixinInterfaceoperator= (const FPMixinInterface &rhs)
 
- Protected Member Functions inherited from FPInterface
virtual FPStatus _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p)
 

Protected Attributes

Tab< InterfaceNotifyCallback * > * interfaceNotifyCBs
 

Friends

class FPMixinInterfaceValue
 

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.
 
- Static Public Attributes inherited from FPInterface
static CoreExport FPInterfaceDesc nullInterface
 

Detailed 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.

Constructor & Destructor Documentation

◆ FPMixinInterface() [1/2]

FPMixinInterface ( const FPMixinInterface rhs)
inlineprotected
569: MXS_fpi(NULL), interfaceNotifyCBs(NULL) { UNUSED_PARAM(rhs); }
#define UNUSED_PARAM(x)
Definition: BuildWarnings.h:18
#define NULL
Definition: autoptr.h:18
Tab< InterfaceNotifyCallback * > * interfaceNotifyCBs
Definition: ifnpub.h:564

◆ FPMixinInterface() [2/2]

FPMixinInterface ( )
inline
574: MXS_fpi(NULL), interfaceNotifyCBs(NULL) {}

◆ ~FPMixinInterface()

Member Function Documentation

◆ operator=()

FPMixinInterface & operator= ( const FPMixinInterface rhs)
inlineprotected
570{ UNUSED_PARAM(rhs); return *this;}

◆ LifetimeControl()

virtual LifetimeType LifetimeControl ( )
inlinevirtual
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. This is the default.

immediateRelease

The interface is only good for one call. 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.

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.

578{ return serverControlled; }
@ serverControlled
Definition: baseinterface.h:104

◆ RegisterNotifyCallback()

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.

◆ UnRegisterNotifyCallback()

virtual void UnRegisterNotifyCallback ( InterfaceNotifyCallback incb)
inlinevirtual
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.

583 {
585 for (int i=0; i < interfaceNotifyCBs->Count(); i++)
586 {
587 if (incb == (*interfaceNotifyCBs)[i])
589 }
590 }
int Delete(int start, int num)
Deletes items from the Tab.
Definition: tab.h:322
int Count() const
Retrieves the number of items in the Tab.
Definition: tab.h:219

◆ 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 FPInterface.

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

595{ if (id == FPMIXININTERFACE_ID) return this; else return FPInterface::GetInterface(id); }
virtual BaseInterface * GetInterface(Interface_ID id)
Definition: ifnpub.h:142
#define FPMIXININTERFACE_ID
Definition: ifnpub.h:61

◆ GetDescByID()

virtual FPInterfaceDesc * GetDescByID ( Interface_ID  id)
inlinevirtual
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, ActionContext, ActionItem, ActionTable, ActionContext, ActionItem, ActionTable, ActionContext, ActionItem, ActionTable, ActionContext, ActionItem, ActionTable, ActionContext, and AssetUser.

613{ UNUSED_PARAM(id); return &nullInterface; }
static CoreExport FPInterfaceDesc nullInterface
Definition: ifnpub.h:139

◆ GetID()

virtual Interface_ID GetID ( )
inlinevirtual
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, ActionContext, ActionItem, ActionTable, ActionContext, ActionItem, ActionTable, ActionContext, ActionItem, ActionTable, ActionContext, ActionItem, ActionTable, ActionContext, AssetUser, IDaylightSystem2, INodeMonitor, INodeTransformMonitor, IRefTargMonitorClass, ILookatControl_Extension, ITreeViewUI, ITreeViewOps, IPopulateFlow, IXRefAtmospheric, IXRefCtrl, IXRefItem, IXRefMaterial, IXRefMaterial18, IXRefObject8, IObjXRefRecord, and IXRefProxy.

624{ return GetDesc()->ID; }
Interface_ID ID
Definition: ifnpub.h:331
virtual FPInterfaceDesc * GetDesc()=0

Friends And Related Function Documentation

◆ FPMixinInterfaceValue

friend class FPMixinInterfaceValue
friend

Member Data Documentation

◆ interfaceNotifyCBs

Tab<InterfaceNotifyCallback*>* interfaceNotifyCBs
protected