![]() |
Spicy
|
#include <plugin.h>
Public Member Functions | |
| const std::vector< Plugin > & | plugins () const |
| Result< std::reference_wrapper< const Plugin > > | pluginForExtension (const hilti::rt::filesystem::path &ext) const |
| const Plugin & | hiltiPlugin () const |
| template<typename PluginMember > | |
| bool | hasHookFor (PluginMember hook) |
| bool | supportsExtension (const hilti::rt::filesystem::path &ext) const |
| auto | supportedExtensions () const |
| void | register_ (const Plugin &p) |
Maintains the set of all available plugins. registry() returns the global singleton registry instance.
|
inline |
Checks if at least one plugin implements a given hook.
| PluginMember | the hook |
| const Plugin & PluginRegistry::hiltiPlugin | ( | ) | const |
Shortcut to return the HILTI plugin. This must have been registered already when called.
| Result< std::reference_wrapper< const Plugin > > PluginRegistry::pluginForExtension | ( | const hilti::rt::filesystem::path & | ext | ) | const |
Returns the plugin handling a module with a given file extension, if available.
| ext | extension, including the leading . |
|
inline |
Returns a vector of all currently registered plugins, sorted by their order numbers.
| void PluginRegistry::register_ | ( | const Plugin & | p | ) |
Registers a plugin with the registry.
plugin::Register() instead.| p | plugin to register |
|
inline |
Returns a vector of all extensions that registered set of plugins handles.
|
inline |
Checks if there a plugin registered for a specific file extension.
| ext | extension, including the leading . |