#include <PluginObject.h>
Public Member Functions | |
Description (const char *className, const std::string_view &classPrefix, const std::string_view &classSuffix) | |
Constructors set name and label to same value. | |
const std::string_view & | pluginClass () const |
Name of the plugin class without any leading prefix or suffix. | |
const std::string & | pluginName () const |
Full name of plugin with prefix and suffix. | |
virtual const std::string_view & | classPrefix () const |
virtual const std::string_view & | classSuffix () const |
Static Public Member Functions | |
static std::string | BuildPluginName (const std::string_view &className, const std::string_view &pluginPrefix, const std::string_view &pluginSuffix) |
static const Description * | find (const std::string_view &className, const std::string_view &pluginPrefix=std::string_view(""), const std::string_view &pluginSuffix=std::string_view("")) |
Static Protected Member Functions | |
static void | pluginBuilderCallback (DD::Image::Description *desc) |
Additional Inherited Members | |
![]() | |
typedef Node *(* | NodeBuilder) (void *) |
typedef std::vector< Description * > | DescriptionList |
![]() | |
const char * | compiled |
const char * | plugin |
License * | license |
![]() | |
void | ctor (void(*f)(Description *)) |
void | ctor (void(*f)(Description *), NodeBuilder nodeBuilder) |
This structure creates a subclass of a general function plugin, possibly from loading a plugin file or a compiled-in Description.
|
staticprotected |
Method type defined in Description.h: (f)(Description), called when the plugin .so is first loaded. This adds the plugin class to the map of loaded ones so that we don't need to search for or load the file again.
References _pluginName, and DD::Image::end().
Referenced by Description().
|
virtual |
Prefix and suffix strings prepended and appended to pluginClass() string to construct plugin filenames. Default implementation returns an empty string.
Reimplemented in DD::Image::ProjectionFunc::Description, slr::SlrIntegrator::Description, and slr::SlrShader::Description.
|
static |
Concatenates the prefix, class name and suffix. This name is used to find the plugin object to load.
|
static |
Find a dso description by name. If it has been previously loaded this method quickly returns an existing cached PluginObject::Description.
It uses BuildPluginName() to construct the full name of the Description. For example if className is 'Spherical', prefix is 'lens', and suffix is 'Abstract' then the full plugin name searched for is 'lensSphericalAbstract'.
Returns nullptr if not found.
References DD::Image::end(), DD::Image::plugin_error(), and DD::Image::plugin_load().
Referenced by DD::Image::PluginObject::_create().
©2025 The Foundry Visionmongers, Ltd. All Rights Reserved. |