plugify  1.0.0.0
Public Member Functions | List of all members
plugify::IPlugifyProvider Class Reference

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>

Inheritance diagram for plugify::IPlugifyProvider:
Inheritance graph
[legend]
Collaboration diagram for plugify::IPlugifyProvider:
Collaboration graph
[legend]

Public Member Functions

void Log (std::string_view msg, Severity severity) const
 Log a message with a specified severity level. More...
 
std::filesystem::path_view GetBaseDir () const noexcept
 Get the base directory of the Plugify system. More...
 
bool IsPreferOwnSymbols () const noexcept
 Checks if the preference for using own symbols is enabled. More...
 
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. More...
 
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. More...
 
- Public Member Functions inherited from plugify::Ref< PlugifyProvider >
 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
 
Refoperator= (const Ref &) &=default
 
Refoperator= (const Ref &) &&=delete
 
Refoperator= (Ref &&) &=default
 
Refoperator= (Ref &&) &&=delete
 
 operator bool () const noexcept
 

Additional Inherited Members

- Protected Attributes inherited from plugify::Ref< PlugifyProvider >
PlugifyProvider * _impl
 

Detailed Description

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 20 of file plugify_provider.hpp.

Member Function Documentation

◆ 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
nameThe name of the language module to check.
requiredVersionOptional required version of the language module.
minimumIf 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
nameThe name of the plugin to check.
requiredVersionOptional required version of the plugin.
minimumIf 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
msgThe message to log.
severityThe severity level of the log message.

The documentation for this class was generated from the following file: