ClassDirectory Class Reference
 
 
 
ClassDirectory Class Reference

This reference page is linked to from the following overview topics: Incremental Improvements, Global Function Publishing API Functions.


#include <plugin.h>

Inheritance diagram for ClassDirectory:
Noncopyable MaxHeapOperators

Class 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 List of Super Class IDs for a list of these super class ids. All methods of this class are implemented by the system. Clients can retrive the sole instance of ClassDirectory via DllDir::ClassDir() or via ClassDirectory::GetInstance()

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

Public Member Functions

CoreExport SubClassList GetClassList (SClass_ID superClassID) const
  Accesses a SubClassList instance that corresponds to all plug-in classes of a certain super class id.
CoreExport int  Count () const
  Returns the number of SubClassList instances in the class directory.
CoreExport SubClassList operator[] (int i) const
  Accesses the i-th SubClassList.
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.
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.
CoreExport int  AddClass (ClassDesc *cdesc, int dllNum, int index, bool load)
CoreExport int  DeleteClass (ClassDesc *cdesc)
CoreExport bool  SetUIInfoForSClass (SClass_ID superClassID, SClassUIInfo *uiInfo)
  Allows for providing additional UI related information pertaining to a superclass.
CoreExport SClassUIInfo GetUIInfoForSClass (SClass_ID superClassID) const
  Retrieves additional UI related information for a given superclass.
  ClassDirectory ()
  ~ClassDirectory ()

Static Public Member Functions

static CoreExport ClassDirectory GetInstance ()
  Retrieves the sole instance of class ClassDirectory.

Constructor & Destructor Documentation

Constructor

Destructor


Member Function Documentation

static CoreExport ClassDirectory& GetInstance ( ) [static]

Retrieves the sole instance of class ClassDirectory.

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
CoreExport int Count ( ) const

Returns the number of SubClassList instances in the class directory.

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].
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
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
CoreExport int AddClass ( ClassDesc cdesc,
int  dllNum,
int  index,
bool  load 
)

Registers a class descriptor with the class directory.

Parameters:
ClassDesc* cdesc - Pointer to the class descriptor. If cdesc replaces an existent class descriptor the system will broadcast a notification:
int dllNum - The index of the DllDesc hosting the class descriptor within DllDir
int index - The index
Returns:
0 if class already exists, -1 if superclass was unknown and 1 if the class added successfully
CoreExport int DeleteClass ( ClassDesc cdesc )

Deletes a class descriptor from the class directory.

Returns:
Returns 1 if successful, or -1 if not.
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.
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.