Class Class_ID
See Also: Dll Functions and Class Descriptors, List of Class_IDs, Generate a Class_ID.
class Class_ID
Description:
This class represents the unique class ID for a 3ds max plug-in. A plug-ins Class_ID must be unique. A program is provided with the SDK to generate these ClassIDs. It is VERY important you use this program to create the ClassIDs for your plug-ins. To generate a random Class_ID and optionally copy it to the clipboard, click Generate a Class_ID. A Class_ID consists of two unsigned 32-bit quantities. The constructor assigns a value to each of these, for example Class_ID(0xCAD834E2, 0x27E47C5A).
All the methods of this class are implemented by the system.
Important Notes:
Make sure you use the program provided to create your ClassIDs. This will greatly reduce the likelihood of conflicts between plug-ins.
If you use one of the 3ds max source code examples to create your plug-in, you MUST change the existing Class_ID. If you don't, you'll get a conflict. If two ClassIDs conflict, the system will only load the first one it finds. The system will post a message when it attempts to load the second one noting that there is a Class_ID conflict.
The sample code plug-ins used in 3ds max use 0 as the second 32-bit quantity of the Class_ID. Only the built-in classes (those that ship with 3ds max) should have the second 32 bits equal to 0. All plug-in developers should use both 32 bit quantities.
Methods:
Prototype:
Class_ID(ulong aa, ulong bb)
Remarks:
Constructor.
This is the standard constructor to be used by 3ds max plug-ins. Each of the 32-bit quantities may be assigned separately.
Parameters:
ulong aa
Assigned to the first 32-bit quantity.
ulong bb
Assigned to the second 32-bit quantity.
Prototype:
Class_ID()
Remarks:
Constructor.
Assigns a value of 0xFFFFFFFF to each 32-bit quantity.
Prototype:
Class_ID(const Class_ID& cid)
Remarks:
Constructor.
Creates a new class ID with the same values as the argument.
Parameters:
const Class_ID& cid
A reference to the Class ID to copy.
Prototype:
ULONG PartA()
Remarks:
Returns the first unsigned 32-bit quantity.
Prototype:
ULONG PartB()
Remarks:
Returns the second unsigned 32-bit quantity.
Operators:
Prototype:
int operator==(const Class_ID& cid) const
Remarks:
Checks for equality between two Class IDs.
Prototype:
int operator!=(const Class_ID& cid) const
Remarks:
Check for Inequality between two Class IDs.
Prototype:
Class_ID& operator=(const Class_ID& cid)
Remarks:
Assignment operator. Note: In release 3.0 and later this method checks for self-assignment.
Prototype:
bool operator<(const Class_ID& rhs) const;
Remarks:
This operator is available in release 4.0 and later only.
Less than operator. This returns true if the specified Class_ID's two parts are numerically less than this Class_ID's; false if not.