THYBasePluginFactory

Overview

Represents the abstract base class that provides common functionality for the plugin factories.

Location

  • Unit: Hydra.VCL.PluginFactories.pas


Properties


Descriptor

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

property Descriptor: THYCrossPlatformPluginDescriptor read write

InstanceCount

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

property InstanceCount: Integer read write

Instance Methods


constructor Create

Creates a new instance of the class.

constructor Create

CreateInstance  virtual abstract

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.

GetInstanceCount  protected virtual abstract

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

function GetInstanceCount: Integer