BaseInterface Class Reference

#include <baseinterface.h>

Class Description

See also
Class InterfaceServer, Class InterfaceNotifyCallback, Class FPInterface, Function Publishing.

Description:
This class represents the base class for interfaces in 3ds Max. The BaseInterface class should be used as the base class for any new interface class in 3ds Max and provides basic identity, memory management, and cloning methods. Class FPInterface, which is part of the Function Publishing system, has the BaseInterface class as its base class.
+ Inheritance diagram for BaseInterface:

Public Types

enum  LifetimeType { noRelease, immediateRelease, wantsRelease, serverControlled }
 

Public Member Functions

virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
UtilExport BaseInterfaceGetInterface (Interface_ID id)
 
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=NULL)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 

Additional Inherited Members

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

Member Enumeration Documentation

Enumerator
noRelease 
immediateRelease 
wantsRelease 
serverControlled 
Definition: baseinterface.h:94
Definition: baseinterface.h:94
Definition: baseinterface.h:94
Definition: baseinterface.h:94

Constructor & Destructor Documentation

virtual UtilExport ~BaseInterface ( )
virtual

Destructor.

Member Function Documentation

virtual UtilExport Interface_ID GetID ( )
virtual
Remarks
This method returns the unique interface ID.

Reimplemented in IMNMeshUtilities13, IMNMeshUtilities10, IMNMeshUtilities8, IMNTempData10, ITimeBasedConverter, IColorSwatchRenamer, IParamBlock2PostLoadInfo, ILookatControl_Extension, MeshSelectionConverter, IXTCAccess, IActionManager10, LightscapeLight::AreaLightCustAttrib, ISplineIKGoal2, IEffectFile, ISplineIKGoal, IHIIKGoal, IIKGoal, ActionTable, MNNormalSpec, FPMixinInterface, ITreeViewOps, FPInterfaceDesc, IRadiosityRenderParameters, ID3DHWMeshCacheManager, IRadiosityEffectExtension, IHardwareRendererST, ActionItem, IPopulateFlow, IBaseGrip2, INewSubTexmapNotification, IRenderElementRequirements, IHardwareShader, INodeEventCallback, IDX9DataBridge, IProjectionModData, MeshNormalSpec, BezierShapeInterface_Ex41, IObjXRefRecord, IXRefObject8, IDaylightSystem2, IDXDataBridge, IXRefItem, ITreeViewUI, ISubMtlMap_BrowserFilter, AssetUser, IMtlBrowserFilter, IXRefMaterial18, IFaceDataMgr, IObjectDisplay2, IToneOperatorExtension, IParameterTranslator, IShaderManager, IActionOptions, IProjection_WorkingModelInfo, IXRefProxy, ITextureDisplay, IHardwareMaterial, INodeTransformMonitor, IXRefAtmospheric, IHLSLMaterialTranslator, IPopulateSeat, IXRefCtrl, IXRefMaterial, IMeshDisplay2, IRefTargMonitorClass, IHardwareRenderer, IDaylightControlledLightSystem, iMNMESH_GPU_Display, INodeMonitor, IMaterialViewportShading, IRTShaderParameterBinding, ILockedContainerUpdate, IViewPanel, INodeValidity, TexmapThreadSafe, IMaterialBrowserEntryInfo, IPipelineClient, IShadeContextExtension8, IDX9VertexShader, IEmissionColor, IDX9PixelShader, ID3D9GraphicsWindow, IHardwareMNMesh, and IHardwareMesh.

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 in IXTCAccess, IIKGoal, FPMixinInterface, NodeAndAnims, ID3DHWMeshCacheManager, FPInterfaceDesc, XMLAnimTreeEntryList, IHardwareShader, IDX9DataBridge, IDXDataBridge, GizmoShape, XMLAnimTreeEntry, AssetUser, Plane, IHardwareMaterial, IHardwareRenderer, INodeValidity, IEmissionColor, ID3D9GraphicsWindow, IHardwareMNMesh, and IHardwareMesh.

119 { return noRelease; }
Definition: baseinterface.h:94
virtual bool RegisterNotifyCallback ( InterfaceNotifyCallback incb)
inlinevirtual
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 in FPMixinInterface.

127 { UNUSED_PARAM(incb); return false; }
#define UNUSED_PARAM(x)
Definition: BuildWarnings.h:18
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 in FPMixinInterface.

135 { UNUSED_PARAM(incb); }
#define UNUSED_PARAM(x)
Definition: BuildWarnings.h:18
virtual BaseInterface* AcquireInterface ( )
inlinevirtual
Remarks
This method is part of the interface reference management and can be implemented by dynamically allocated interfaces for ref-count based lifetime control). This method should return TRUE if it needs Release() to be called.
Default Implementation:
{ return false; }

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

142 { return (BaseInterface*)this; };
Definition: baseinterface.h:67
virtual void ReleaseInterface ( )
inlinevirtual
Remarks
This method is called when a reference to this object is deleted.
Default Implementation:
{ }

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

146 { };
virtual void DeleteInterface ( )
inlinevirtual
Remarks
This method can be used as a direct interface delete request.
Default Implementation:
{ }

Reimplemented in MeshSelectionConverter, MNNormalSpec, MeshNormalSpec, BezierShapeInterface_Ex41, iMNMESH_GPU_Display, and INodeValidity.

152 { };
virtual BaseInterface* CloneInterface ( void remapDir = NULL)
inlinevirtual
Remarks
This method allows you to clone the base interface.
Parameters:
void* remapDir

The RemapDir passed to the clone method.
Default Implementation:
{ return NULL; }

Reimplemented in MeshSelectionConverter, MNNormalSpec, and MeshNormalSpec.

161 { UNUSED_PARAM(remapDir); return NULL; }
#define NULL
Definition: autoptr.h:18
#define UNUSED_PARAM(x)
Definition: BuildWarnings.h:18