When its entry-point function is called, a module “registers” zero-to-many
plugin factories with the application. A Plugin Factory is a C++ class that
performs two tasks - it provides metadata that describes a plugin type, and it
is used to create instances of that plugin type. Each plugin factory must
implement the k3d::iplugin_factory interface, which is used to retrieve
plugin metadata (unique identifier, human-readable name, human-readable
description, etc), and either the k3d::iapplication_plugin_factory or
k3d::idocument_plugin_factory interfaces, which are used to instantiate
plugins.
Following is a list of plugin metadata provided via k3d::iplugin_factory:
-
factory_id - Universally-unique identifier for the factory.
-
name - Human-readable plugin name, displayed in the user interface and used to instantiate plugins from scripts.
-
short_description - Short human-readable description of what the plugin does, displayed in the application user interface and in automatically-generated documentation.
-
categories - Arbitrary list of human-readable categories that are used to group plugins in the user interface.
-
quality - Special enumerated value that describes a plugin as "Stable", "Experimental", or "Deprecated" in the user interface. See ??? for details.
-
interfaces - Provides a list of interfaces supported by the plugin type. Used in special circumstances by code that needs to determine the capabilities of a plugin before instantiating it.
-
metadata - Provides a collection of arbitrary name-value pairs that can be set by a plugin author and used by the user interface or other layers.