FPMixinInterface Class Reference

#include <ifnpub.h>

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.
+ 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 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. More...
 
virtual BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=NULL)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 

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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
- Static Public Attributes inherited from FPInterface
static CoreExport FPInterfaceDesc nullInterface
 

Constructor & Destructor Documentation

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

Member Function Documentation

FPMixinInterface& operator= ( const FPMixinInterface rhs)
inlineprotected
570 { UNUSED_PARAM(rhs); return *this;}
#define UNUSED_PARAM(x)
Definition: BuildWarnings.h:18
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.

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 NodeAndAnims, XMLAnimTreeEntryList, GizmoShape, XMLAnimTreeEntry, AssetUser, and Plane.

578 { return serverControlled; }
Definition: baseinterface.h:94
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)
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  {
584  if (interfaceNotifyCBs)
585  for (int i=0; i < interfaceNotifyCBs->Count(); i++)
586  {
587  if (incb == (*interfaceNotifyCBs)[i])
589  }
590  }
int Count() const
Retrieves the number of items in the Tab.
Definition: tab.h:219
int Delete(int start, int num)
Deletes items from the Tab.
Definition: tab.h:290
Tab< InterfaceNotifyCallback * > * interfaceNotifyCBs
Definition: ifnpub.h:564
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 INode, SimpleManipulator, ITreeView, ITrackBar, ActionTable, ActionItem, AssetUser, PFSimpleTest, PFSimpleAction, PFSimpleOperator, and PFSimpleActionState.

595 { if (id == FPMIXININTERFACE_ID) return this; else return FPInterface::GetInterface(id); }
#define FPMIXININTERFACE_ID
Definition: ifnpub.h:61
virtual BaseInterface * GetInterface(Interface_ID id)
Definition: ifnpub.h:142
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 ActionTable, ActionItem, and AssetUser.

613 { UNUSED_PARAM(id); return &nullInterface; }
#define UNUSED_PARAM(x)
Definition: BuildWarnings.h:18
static CoreExport FPInterfaceDesc nullInterface
Definition: ifnpub.h:139
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 ILookatControl_Extension, ActionTable, ITreeViewOps, ActionItem, IPopulateFlow, IObjXRefRecord, IXRefObject8, IDaylightSystem2, IXRefItem, ITreeViewUI, AssetUser, IXRefMaterial18, IXRefProxy, INodeTransformMonitor, IXRefAtmospheric, IXRefCtrl, IXRefMaterial, IRefTargMonitorClass, and INodeMonitor.

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

Friends And Related Function Documentation

friend class FPMixinInterfaceValue
friend

Member Data Documentation

Tab<InterfaceNotifyCallback*>* interfaceNotifyCBs
protected