THYVCLCrossPlatformPluginFactory

Overview

The THYVCLCrossPlatformPluginFactory factory class is used internally in the Hydra framework to create new instances of VCL cross-platform plugins.

You do not need to use this class directly, instead, you can use the THYModuleManager to create new instances.

Location

 

constructor Create    (declared in THYBasePluginFactory)

Creates a new instance of the class.

constructor Create

constructor Create (Cardinal, IHYCrossPlatformModule, THYCrossPlatformPluginDescriptor)  overload    (declared in THYPluginFactory)

Creates a new instance of the class.

constructor Create(aModuleInstance: Cardinal; aModuleController: IHYCrossPlatformModule; aDescriptior: THYCrossPlatformPluginDescriptor)

Parameters:

  • aModuleInstance: Handle of the module instance. By default HInstance.
  • aModuleController: Module controller
  • aDescriptior: Reference to a descriptor object that holds plugin data.

constructor Create (Cardinal, string, THYCrossPlatformPluginCreatorFunc, THYCrossPlatformPluginDescriptor)  overload    (declared in THYPluginFactory)

Creates a new instance of the class.

constructor Create(aModuleInstance: Cardinal; const aPluginName: string; aCreatorFunc: THYCrossPlatformPluginCreatorFunc; aDescriptior: THYCrossPlatformPluginDescriptor)

Parameters:

  • aModuleInstance: Handle of the module instance. By default HInstance.
  • aPluginName: Name of the plugin.
  • aCreatorFunc: Function that will be used to create new plugin instances.
  • aDescriptior: Reference to a descriptor object that holds plugin data.

constructor Create (Cardinal, string, THYCrossPlatformPluginCreatorFunc, TClass, Integer, Integer, string, string, string)  overload    (declared in THYPluginFactory)

Creates a new instance of the class.

constructor Create(aModuleInstance: Cardinal; const aPluginName: string; aCreatorFunc: THYCrossPlatformPluginCreatorFunc; aPluginClass: TClass; aMajorVersion: Integer; aMinorVersion: Integer; const aRequiredPrivilege: string; const aDescription: string; const aUserData: string)

Parameters:

  • aModuleInstance: Handle of the module instance. By default HInstance.
  • aPluginName: Name of the plugin.
  • aCreatorFunc: Function that will be used to create new plugin instances.
  • aPluginClass: Class of the plugin.
  • aMajorVersion: Major version number.
  • aMinorVersion: Minor version number.
  • aRequiredPrivilege: String that describes the privilege needed to use this pluign.
  • aDescription: String that holds the plugin description.
  • aUserData: String that holds your custom data.

constructor Create (IHYCrossPlatformModule, THYCrossPlatformPluginDescriptor)  overload

Creates a new instance of the class.

constructor Create(anInstance: IHYCrossPlatformModule; CrossPlatformDescriptor: THYCrossPlatformPluginDescriptor)

Parameters:

  • anInstance: Cross-platform module instance
  • CrossPlatformDescriptor: Descriptor

CreateInstance  override    (declared in THYPluginFactory)

Creates a new plugin instance. If the plugin instance supports the IHYVCLPlugin interface, this method will set its host to the provided aHost parameter. If instance supports the IHYVCLInstanceCounting interface, this method will call its RegisterFactory method.

Note: You will not call this method directly, to create a new plugin instance you can use one of the THYModuleManager methods, like CreateVisualPlugin or CreateNonVisualPlugin.

procedure CreateInstance(const aHost: IHYVCLHost; out anInstance: IInterface)

Parameters:

  • aHost: Reference to a host instance.
  • anInstance: Reference to a new instance of a plugin.

CreateWrapper  protected    (declared in THYPluginFactory)

function CreateWrapper(aPluginInstance: IDispatch; Descriptor: THYPluginDescriptor): IInterface

Parameters:

  • aPluginInstance:
  • Descriptor:

Descriptor    (declared in THYBasePluginFactory)

Returns the descriptor of the plugin that is represented by the factory.

property Descriptor: THYCrossPlatformPluginDescriptor read

GetInstanceCount  protected override    (declared in THYPluginFactory)

Gets the count of plugin instances that were created by this factory.

function GetInstanceCount: Integer

InstanceCount    (declared in THYBasePluginFactory)

Returns the count of plugin instances that were created by this factory.

property InstanceCount: Integer read

InstanceDestroying    (declared in THYPluginFactory)

If the plugin instance supports the IHYVCLInstanceCounting interface, it will call this method to notify the factory about instance destruction.

procedure InstanceDestroying

ModuleCreateInstance  protected override

function ModuleCreateInstance: IInterface

 

Descriptor    (declared in THYBasePluginFactory)

Returns the descriptor of the plugin that is represented by the factory.

property Descriptor: THYCrossPlatformPluginDescriptor read

InstanceCount    (declared in THYBasePluginFactory)

Returns the count of plugin instances that were created by this factory.

property InstanceCount: Integer read

 

constructor Create    (declared in THYBasePluginFactory)

Creates a new instance of the class.

constructor Create

constructor Create (Cardinal, IHYCrossPlatformModule, THYCrossPlatformPluginDescriptor)  overload    (declared in THYPluginFactory)

Creates a new instance of the class.

constructor Create(aModuleInstance: Cardinal; aModuleController: IHYCrossPlatformModule; aDescriptior: THYCrossPlatformPluginDescriptor)

Parameters:

  • aModuleInstance: Handle of the module instance. By default HInstance.
  • aModuleController: Module controller
  • aDescriptior: Reference to a descriptor object that holds plugin data.

constructor Create (Cardinal, string, THYCrossPlatformPluginCreatorFunc, THYCrossPlatformPluginDescriptor)  overload    (declared in THYPluginFactory)

Creates a new instance of the class.

constructor Create(aModuleInstance: Cardinal; const aPluginName: string; aCreatorFunc: THYCrossPlatformPluginCreatorFunc; aDescriptior: THYCrossPlatformPluginDescriptor)

Parameters:

  • aModuleInstance: Handle of the module instance. By default HInstance.
  • aPluginName: Name of the plugin.
  • aCreatorFunc: Function that will be used to create new plugin instances.
  • aDescriptior: Reference to a descriptor object that holds plugin data.

constructor Create (Cardinal, string, THYCrossPlatformPluginCreatorFunc, TClass, Integer, Integer, string, string, string)  overload    (declared in THYPluginFactory)

Creates a new instance of the class.

constructor Create(aModuleInstance: Cardinal; const aPluginName: string; aCreatorFunc: THYCrossPlatformPluginCreatorFunc; aPluginClass: TClass; aMajorVersion: Integer; aMinorVersion: Integer; const aRequiredPrivilege: string; const aDescription: string; const aUserData: string)

Parameters:

  • aModuleInstance: Handle of the module instance. By default HInstance.
  • aPluginName: Name of the plugin.
  • aCreatorFunc: Function that will be used to create new plugin instances.
  • aPluginClass: Class of the plugin.
  • aMajorVersion: Major version number.
  • aMinorVersion: Minor version number.
  • aRequiredPrivilege: String that describes the privilege needed to use this pluign.
  • aDescription: String that holds the plugin description.
  • aUserData: String that holds your custom data.

constructor Create (IHYCrossPlatformModule, THYCrossPlatformPluginDescriptor)  overload

Creates a new instance of the class.

constructor Create(anInstance: IHYCrossPlatformModule; CrossPlatformDescriptor: THYCrossPlatformPluginDescriptor)

Parameters:

  • anInstance: Cross-platform module instance
  • CrossPlatformDescriptor: Descriptor

CreateInstance  override    (declared in THYPluginFactory)

Creates a new plugin instance. If the plugin instance supports the IHYVCLPlugin interface, this method will set its host to the provided aHost parameter. If instance supports the IHYVCLInstanceCounting interface, this method will call its RegisterFactory method.

Note: You will not call this method directly, to create a new plugin instance you can use one of the THYModuleManager methods, like CreateVisualPlugin or CreateNonVisualPlugin.

procedure CreateInstance(const aHost: IHYVCLHost; out anInstance: IInterface)

Parameters:

  • aHost: Reference to a host instance.
  • anInstance: Reference to a new instance of a plugin.

CreateWrapper  protected    (declared in THYPluginFactory)

function CreateWrapper(aPluginInstance: IDispatch; Descriptor: THYPluginDescriptor): IInterface

Parameters:

  • aPluginInstance:
  • Descriptor:

GetInstanceCount  protected override    (declared in THYPluginFactory)

Gets the count of plugin instances that were created by this factory.

function GetInstanceCount: Integer

InstanceDestroying    (declared in THYPluginFactory)

If the plugin instance supports the IHYVCLInstanceCounting interface, it will call this method to notify the factory about instance destruction.

procedure InstanceDestroying

ModuleCreateInstance  protected override

function ModuleCreateInstance: IInterface