class MaxObject

Summary

An abstract class that represents an object in the max environment.

syntax:
public abstract class MaxObject

Properties

Disposed

Whether or not this object has been disposed. If not disposed, it has not been removed from the Max Library Machine kernel’s space yet.

syntax:
public bool Disposed { get; private set; }

Initialized

Whether or not this object has been initialized. If not initialized, it does not exist in the Max Library Machine kernel’s space yet.

syntax:
public bool Initialized { get; private set; }

UID

The max UID value, used to identify this object in the kernel.

syntax:
public ulong UID { get; private set; }

Methods

Create()

The object’s creation method. The developer can override this method so that custom routines can be defined. If not overriden, this method does nothing.

syntax:
public virtual void Create()

Destroy()

The object’s destruction method. The developer can override this method so that custom routines can be defined. The developer should release resources and destroy child objects with this method as well as general destruction methods. If not overriden, this method does nothing.

syntax:
public virtual void Destroy()

Dispose()

Disposes this MaxObject and prepares it to be destroyed in the kernel.

syntax:
public void Dispose()

InstanceCreate()

Creates a new empty instance of this object.

syntax:
protected abstract MaxObject InstanceCreate();

Returns: New instance ( abstract MaxObject )

AddProperty(string Name, IDataType Type)

Adds a new property to the object’s property list.

syntax:
protected void AddProperty(string Name, IDataType Type)

Parameters

Type Name Description
string Name Name
IDataType Type Type

Returns: Property ID ( void )

get()

Gets a property’s value.

syntax:
protected IDataType get([System.Runtime.CompilerServices.CallerMemberName] string Name = "")

Returns: Value ( IDataType )

set(IDataType Value)

Sets a property’s value.

syntax:
protected void set(IDataType Value, [System.Runtime.CompilerServices.CallerMemberName] string Name = "")

Parameters

Type Name Description
IDataType Value Value