3ds Max C++ API Reference
Loading...
Searching...
No Matches
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.
 
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 ()
 

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

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

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

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

156{ };

◆ DeleteInterface()

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

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

162{ };

◆ CloneInterface()

virtual BaseInterface * CloneInterface ( void remapDir = nullptr)
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.

171{ UNUSED_PARAM(remapDir); return nullptr; }