Interface class for the PlugifyProvider, which is provided to the user and implemented in the core. The PlugifyProvider is responsible for managing and providing essential functionality to the Plugify system.
More...
#include <plugify_provider.hpp>
|
void | Log (std::string_view msg, Severity severity) const |
| Log a message with a specified severity level.
|
|
std::filesystem::path_view | GetBaseDir () const noexcept |
| Get the base directory of the Plugify system.
|
|
bool | IsPreferOwnSymbols () const noexcept |
| Checks if the preference for using own symbols is enabled.
|
|
bool | IsPluginLoaded (std::string_view name, std::optional< int32_t > requiredVersion={}, bool minimum=false) const noexcept |
| Checks if a plugin with the specified name is loaded.
|
|
bool | IsModuleLoaded (std::string_view name, std::optional< int32_t > requiredVersion={}, bool minimum=false) const noexcept |
| Checks if a language module with the specified name is loaded.
|
|
PluginOpt | FindPlugin (std::string_view name) const noexcept |
| Finds a plugin by its name.
|
|
ModuleOpt | FindModule (std::string_view name) const noexcept |
| Finds a language module by its name.
|
|
| Ref (PlugifyProvider &impl) noexcept |
|
| Ref (Ref const &)=default |
|
| Ref (Ref &&)=default |
|
bool | operator== (const Ref &other) const noexcept |
|
bool | operator== (const PlugifyProvider *impl) const noexcept |
|
Ref & | operator= (const Ref &) &=default |
|
Ref & | operator= (const Ref &) &&=delete |
|
Ref & | operator= (Ref &&) &=default |
|
Ref & | operator= (Ref &&) &&=delete |
|
| operator bool () const noexcept |
|
const void *const | GetPtr () const noexcept |
|
Interface class for the PlugifyProvider, which is provided to the user and implemented in the core. The PlugifyProvider is responsible for managing and providing essential functionality to the Plugify system.
Definition at line 33 of file plugify_provider.hpp.
◆ FindModule()
ModuleOpt plugify::IPlugifyProvider::FindModule |
( |
std::string_view |
name | ) |
const |
|
noexcept |
Finds a language module by its name.
This function attempts to find a language module with the specified name in the Plugify system. If a module with the given name is found, a reference to it is returned. Otherwise, an empty optional value is returned.
- Parameters
-
name | The name of the language module to find. |
- Returns
- An optional reference to the module if found, or an empty optional if not found.
◆ FindPlugin()
PluginOpt plugify::IPlugifyProvider::FindPlugin |
( |
std::string_view |
name | ) |
const |
|
noexcept |
Finds a plugin by its name.
This function attempts to find a plugin with the specified name in the Plugify system. If a plugin with the given name is found, a reference to it is returned. Otherwise, an empty optional value is returned.
- Parameters
-
name | The name of the plugin to find. |
- Returns
- An optional reference to the plugin if found, or an empty optional if not found.
◆ GetBaseDir()
std::filesystem::path_view plugify::IPlugifyProvider::GetBaseDir |
( |
| ) |
const |
|
noexcept |
Get the base directory of the Plugify system.
- Returns
- Reference to the base directory path.
◆ IsModuleLoaded()
bool plugify::IPlugifyProvider::IsModuleLoaded |
( |
std::string_view |
name, |
|
|
std::optional< int32_t > |
requiredVersion = {} , |
|
|
bool |
minimum = false |
|
) |
| const |
|
noexcept |
Checks if a language module with the specified name is loaded.
This function checks if a language module with the specified name is currently loaded. Optionally, you can specify a required version and set the minimum
parameter to true to check if the loaded version meets or exceeds the required version.
- Parameters
-
name | The name of the language module to check. |
requiredVersion | Optional required version of the language module. |
minimum | If true, checks if the loaded version meets or exceeds the required version. |
- Returns
- True if the language module is loaded and meets the version requirements, false otherwise.
◆ IsPluginLoaded()
bool plugify::IPlugifyProvider::IsPluginLoaded |
( |
std::string_view |
name, |
|
|
std::optional< int32_t > |
requiredVersion = {} , |
|
|
bool |
minimum = false |
|
) |
| const |
|
noexcept |
Checks if a plugin with the specified name is loaded.
This function checks if a plugin with the specified name is currently loaded. Optionally, you can specify a required version and set the minimum
parameter to true to check if the loaded version meets or exceeds the required version.
- Parameters
-
name | The name of the plugin to check. |
requiredVersion | Optional required version of the plugin. |
minimum | If true, checks if the loaded version meets or exceeds the required version. |
- Returns
- True if the plugin is loaded and meets the version requirements, false otherwise.
◆ IsPreferOwnSymbols()
bool plugify::IPlugifyProvider::IsPreferOwnSymbols |
( |
| ) |
const |
|
noexcept |
Checks if the preference for using own symbols is enabled.
This function returns whether the preference for loading symbols from the library itself (as opposed to shared libraries) is enabled. This can be useful in environments where symbol conflicts might arise and isolating symbols to their respective libraries is necessary.
- Note
- Start using RTLD_DEEPBIND flag by default.
- Returns
- True if the preference for using own symbols is enabled, false otherwise.
◆ Log()
void plugify::IPlugifyProvider::Log |
( |
std::string_view |
msg, |
|
|
Severity |
severity |
|
) |
| const |
Log a message with a specified severity level.
- Parameters
-
msg | The message to log. |
severity | The severity level of the log message. |
The documentation for this class was generated from the following file: