Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# IDPlugin Class Reference

`#include <PluginCommon.hpp>`

List of all members.

## Public Member Functions
virtual | ~IDPlugin ()
| Destructor.
virtual const char * | GetName ()=0
virtual const char * | GetDescription ()=0
virtual const char * | GetVersion ()=0
virtual const char * | GetAuthor ()=0
virtual const char * | GetEmail ()=0
virtual const char * | GetURL ()=0
virtual IDPResult | OnCreate (IDPManager *PluginManager)=0
virtual void | OnDestroy ()=0
virtual void | OnEvent (int Event, DWORD Param1, DWORD Param2)=0
virtual void | OnCommand (deString *sCommand)=0
virtual IDPResult | GetLastResult ()=0
virtual int | GetLastResultEx ()=0
virtual const char * | ResultToStringEx (int Result)=0
virtual IDPObject * | CreateObject (const char *ObjectType)=0
virtual IDPControl * | CreateControl (const char *ControlType)=0
virtual BOOL | SupportsInterface (const char *InterfaceName)=0

## Detailed Description

IDPlugin Interface. This is the main plugin interface and is the starting point for all loaded plugins. This interface Must be used for any plugin.

## Constructor & Destructor Documentation

virtual IDPlugin::~IDPlugin | ( |  | ) | `[inline, virtual]`

| Destructor.

## Member Function Documentation

virtual IDPControl* IDPlugin::CreateControl | ( | const char * | ControlType | ) | `[pure virtual]`

  | Called by the PluginManager to create a new Custom Control. If an object property calls for a custom control type, and this plugin is registered as the controller of that type, this method will be called to obtain a new control instance pointer. Returns: Instance pointer of the new control Parameters:
  ControlType | String indicating the type of control to be created

virtual IDPObject* IDPlugin::CreateObject | ( | const char * | ObjectType | ) | `[pure virtual]`

  | Called by the PluginManager to create a new Scene Object. Called by the PluginManager when the user or another plugin has asked to create a new Scene Object of the specified type, and this is the plugin registered to handle it. Returns: Instance pointer for the new object Parameters:
  ObjectType | String indicating the name of the registered object type being requested

virtual const char* IDPlugin::GetAuthor | ( |  | ) | `[pure virtual]`

| Used to obtain the author of the plugin Returns: Author of the plugin as a string

virtual const char* IDPlugin::GetDescription | ( |  | ) | `[pure virtual]`

| Used to obtain a description of the plugin Returns: Description of the plugin as a string

virtual const char* IDPlugin::GetEmail | ( |  | ) | `[pure virtual]`

| Used to obtain a contact email for the plugin Returns: Contact email as a string

virtual IDPResult IDPlugin::GetLastResult | ( |  | ) | `[pure virtual]`

| Retrieves the last result code set by the plugin. This allows the system, or another plugin to retrieve the last set result code, and is usefull in instances where a function doesn't permitt a result code to be returned, but has the chance for failure, such as CreateObject() Returns: The last IDPResult code set by the plugin

virtual int IDPlugin::GetLastResultEx | ( |  | ) | `[pure virtual]`

| Retrieves an extended result code. This allows plugins to return result codes that are not system standard., but are more specific to the plugin. Returns: Integer value indiciating the last set extended result code

virtual const char* IDPlugin::GetName | ( |  | ) | `[pure virtual]`

| Used to obtain the name of the plugin Returns: The name of the plugin as a string

virtual const char* IDPlugin::GetURL | ( |  | ) | `[pure virtual]`

| Used to obtain a contact URL for the plugin Returns: Contact URL for the plugin as a string

virtual const char* IDPlugin::GetVersion | ( |  | ) | `[pure virtual]`

| Used to obtain the version of the plugin Returns: Version of the plugin as a string

virtual void IDPlugin::OnCommand | ( | deString * | sCommand | ) | `[pure virtual]`

| Callback for user hotkeyed commands. OnCommand() will be called by the interface whenever a hotkeyable command registerd by the plugin has been trigger by the user. param sCommand Name of the command that has been fired off as it was registered by the plugin initially

virtual IDPResult IDPlugin::OnCreate | ( | IDPManager * | PluginManager | ) | `[pure virtual]`

  | Called by the PluginManager when the plugin is first created. This event is called on the plugin immediately after it has been loaded by the system. This is where any basic initialization should be done, as well as registration of object and control types. Returns: The plugin should return IDP_OK if everything is good and the plugin can be kept loaded by the system. If the plugin returns anything other than IDP_OK, then the system will immediately unload the plugin. In this case, the OnDestroy() event will NOT take place. Parameters:
  PluginManager | Pointer to the main PluginManager instance that the plugin can save and use throughout the life of the plugin.
Warning: At this stage, not all of the plugins will be loaded, therefore any operations that depend on another plugin should not be placed here (such as creating an object), but instead should be placed in the OnInitialUpdate() event.

virtual void IDPlugin::OnDestroy | ( |  | ) | `[pure virtual]`

| Called by the PluginManager when the plugin is about to be unloaded. This event is called on the plugin just before it is unloaded, and should be used for last minute cleanup and shutdown of the plugin and any objects it spawned.

virtual void IDPlugin::OnEvent | ( | int | Event,
|  | DWORD | Param1,
|  | DWORD | Param2
| ) | `[pure virtual]`

  | The callback for most all plugin events. OnEvent() is used for most all plugin events, such as frame calls, window resizing, context menus, etc. Parameters:
  Event | The event ID which caused this callback
  Param1 | DWRORD param used for passing event specific values
  Param2 | DWRORD param used for passing event specific values
Note: Information on specific parameter packign can be found documented with the specific event flag of interest. The plugin or object will only recieve a callback for the events it has enabled handlers for. See the IDPMEventHandler interface, and IDPManager::GetEventHandler() for more information on setting up event handlers.

virtual const char* IDPlugin::ResultToStringEx | ( | int | Result | ) | `[pure virtual]`

  | Converts an extended result code to user readable text. Because extended result codes are meaningless to the system, this function can take an extended result code and return a user readable string which can then be displayed to the user to help explain the problem. Returns: User readable string describing the error Parameters:
  Result | Extended result code to be converted

virtual BOOL IDPlugin::SupportsInterface | ( | const char * | InterfaceName | ) | `[pure virtual]`

  | Queries the interface to determine if a specified interface is supported. At the present time there is only one revision level in each interface, and this is not used. This function is for future expansion. Returns: TRUE if the interface specified is supported, or FALSE if not Parameters:
  InterfaceName | Name of the interface to query for

The documentation for this class was generated from the following file:

- PluginCommon.hpp