3ds Max C++ API Reference
BaseInterface Class Reference

#include <baseinterface.h>

+ 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...
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

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...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

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

Member Enumeration Documentation

◆ LifetimeType

Enumerator
noRelease 
immediateRelease 
wantsRelease 
serverControlled 
@ immediateRelease
Definition: baseinterface.h:104
@ serverControlled
Definition: baseinterface.h:104
@ noRelease
Definition: baseinterface.h:104
@ wantsRelease
Definition: baseinterface.h:104

Constructor & Destructor Documentation

◆ ~BaseInterface()

virtual UtilExport ~BaseInterface ( )
virtual

Destructor.

Member Function Documentation

◆ GetInterface()

◆ GetID()

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

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

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

129 { return noRelease; }

◆ RegisterNotifyCallback()

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.

137 { UNUSED_PARAM(incb); return false; }
#define UNUSED_PARAM(x)
Definition: BuildWarnings.h:18

◆ 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 in FPMixinInterface.

145 { UNUSED_PARAM(incb); }

◆ AcquireInterface()

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

152 { return (BaseInterface*)this; };
Definition: baseinterface.h:78

◆ ReleaseInterface()

virtual void ReleaseInterface ( )
inlinevirtual
Remarks
This method is called when a reference to this object is deleted.
Default Implementation:
{ }

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

156 { };

◆ DeleteInterface()

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

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

162 { };

◆ CloneInterface()

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 MNNormalSpec, MeshNormalSpec, and MeshSelectionConverter.

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