3ds Max C++ API Reference
ClassDirectory Class Reference

This class represents the directory of all plug-in classes known to the system. More...

#include <plugin.h>

+ Inheritance diagram for ClassDirectory:

Public Member Functions

CoreExport SubClassListGetClassList (SClass_ID superClassID) const
 Accesses a SubClassList instance that corresponds to all plug-in classes of a certain super class id. More...
 
CoreExport int Count () const
 Returns the number of SubClassList instances in the class directory. More...
 
CoreExport SubClassListoperator[] (int i) const
 Accesses the i-th SubClassList. More...
 
CoreExport ClassDescFindClass (SClass_ID superClassID, const Class_ID &classID) const
 Returns a class descriptor that corresponds to a certain super and class id combination. More...
 
CoreExport ClassEntryFindClassEntry (SClass_ID superClassID, const Class_ID &classID) const
 Returns a class entry that corresponds to a certain super and class id combination. More...
 
CoreExport int AddClass (ClassDesc *cdesc, int dllNum, int index, bool loading)
 
CoreExport int DeleteClass (ClassDesc *cdesc)
 
CoreExport bool SetUIInfoForSClass (SClass_ID superClassID, SClassUIInfo *uiInfo)
 Allows for providing additional UI related information pertaining to a superclass. More...
 
CoreExport SClassUIInfoGetUIInfoForSClass (SClass_ID superClassID) const
 Retrieves additional UI related information for a given superclass. More...
 
 ClassDirectory ()
 
 ~ClassDirectory ()
 

Static Public Member Functions

static CoreExport ClassDirectoryGetInstance ()
 Retrieves the sole instance of class ClassDirectory. More...
 
- 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...
 

Additional Inherited Members

- Protected Member Functions inherited from Noncopyable
 Noncopyable ()
 
 ~Noncopyable ()
 

Detailed Description

This class represents the directory of all plug-in classes known to the system.

The plug-in classes are grouped by super class id. The set of classes in each superclass group can be accessed. For each plug-in class, its ClassDesc can be then retrieved. All plug-in classes must have one of the super class ids pre-defined in the 3ds Max SDK. See Super Class IDs for a list of these super class ids. All methods of this class are implemented by the system. Clients can retrieve the sole instance of ClassDirectory via DllDir::ClassDir() or via ClassDirectory::GetInstance()

See also
Class DllDir, Class SubClassList, Class Class_ID, Class ClassDesc.

Constructor & Destructor Documentation

◆ ClassDirectory()

Constructor

◆ ~ClassDirectory()

Destructor

Member Function Documentation

◆ GetInstance()

static CoreExport ClassDirectory& GetInstance ( )
static

Retrieves the sole instance of class ClassDirectory.

◆ GetClassList()

CoreExport SubClassList* GetClassList ( SClass_ID  superClassID) const

Accesses a SubClassList instance that corresponds to all plug-in classes of a certain super class id.

Parameters
superClassID- The super class ID

◆ Count()

CoreExport int Count ( ) const

Returns the number of SubClassList instances in the class directory.

◆ operator[]()

CoreExport SubClassList& operator[] ( int  i) const

Accesses the i-th SubClassList.

Parameters
i- Specifies which sub class list to access. Must be in the range [0 and Count()-1].

◆ FindClass()

CoreExport ClassDesc* FindClass ( SClass_ID  superClassID,
const Class_ID classID 
) const

Returns a class descriptor that corresponds to a certain super and class id combination.

Parameters
superClassID- The super class id
classID- The class id

◆ FindClassEntry()

CoreExport ClassEntry* FindClassEntry ( SClass_ID  superClassID,
const Class_ID classID 
) const

Returns a class entry that corresponds to a certain super and class id combination.

Parameters
superClassID- The super class id
classID- The class id

◆ AddClass()

CoreExport int AddClass ( ClassDesc cdesc,
int  dllNum,
int  index,
bool  loading 
)

Registers a class descriptor with the class directory.

Parameters
cdesc- Pointer to the class descriptor. If cdesc replaces an existent class descriptor the system will broadcast a notification:
#define NOTIFY_CLASSDESC_REPLACED
Provides a notification that a ClassDesc is being replaced by another one.
Definition: notify.h:548
CoreExport void BroadcastNotification(int code)
dllNum- The index of the DllDesc hosting the class descriptor within DllDir
index- The index
loading- Set to true if AddClass() is called while loading a plug-in, and false when it is called when the plug-in's proxy data is loaded during deferred loading.
Returns
0 if class already exists, -1 if superclass was unknown and 1 if the class added successfully

◆ DeleteClass()

CoreExport int DeleteClass ( ClassDesc cdesc)

Deletes a class descriptor from the class directory.

Returns
Returns 1 if successful, or -1 if not.

◆ SetUIInfoForSClass()

CoreExport bool SetUIInfoForSClass ( SClass_ID  superClassID,
SClassUIInfo uiInfo 
)

Allows for providing additional UI related information pertaining to a superclass.

Currently this includes a descriptive string, a color, and a method which draws a representative image in a Windows DC.

Parameters
superClassID- The super class id the info pertains to
uiInfo- A pointer to a SClassUIInfo object that carries the information
Returns
- Returns true if successful or false if the superclass was not found.

◆ GetUIInfoForSClass()

CoreExport SClassUIInfo* GetUIInfoForSClass ( SClass_ID  superClassID) const

Retrieves additional UI related information for a given superclass.

Parameters
superClassID- The super class id
Returns
- Returns NULL if the superclass was not found or if no superclass information was assigned.