![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Base/Framework.h>
Record to configure the initialization of the ImFusion SDK. More...
Record to configure the initialization of the ImFusion SDK.
It provides a central place where you can configure all SDK initialization options and also shows the default settings if you simply call Framework::init().
Logging-related settings | |
bool | initLogging = true |
Flag whether to initialize logging. | |
Log::Level | minimumLogLevel = Log::Level::Info |
Minimum log level/severity to set during Log::init() | |
Log::Mode | loggingMode = Log::Mode::Synchronous |
Operation mode of the logging framework. | |
bool | addConsoleSink = true |
Flag whether to add a console logger (Log::ConsoleSink) | |
Flags< Log::ConsoleSink::Options > | consoleSinkOptions |
bool | addFileSink = false |
Flag whether to add a file logger (Log::FileSink) | |
std::string | fileSinkFilename = "" |
Filename to use for the file logger (must not be empty if enabled) | |
Flags< Log::FileSink::Options > | fileSinkOptions = Log::FileSink::None |
< Configuration options of created FileSink if enabled | |
ByteSize | fileSinkMaxFileSize = ByteSize(0) |
Maximum log file size for log rotation, 0 to disable. | |
OpenGL-related settings | |
bool | initOpenGL = true |
Flag whether to initialize OpenGL (GlContextManager) | |
std::unique_ptr< GL::Context > | glContext |
Optional OpenGL context to use as main context for the framework. | |
Plugin loading-related settings | |
bool | loadPlugins = false |
Flag whether to search for plugins using Framework::loadPlugins(). | |
std::vector< std::string > | pluginSearchFolders |
Search paths that are passed to Framework::loadPlugins() if loadPlugins is true. | |
Other settings | |
std::function< void()> | licenseInitFunction = defaultLicenseInitFunction() |
Function will be called once during framework initialization just before checking the license state. | |
std::function< void(const std::string &errMsg, int gracePeriodSec)> | licenseExpirationHandler |
Optional function to handle the case when a license expiration happens during runtime. | |
std::optional< bool > | installCrashHandler = std::nullopt |
Flag whether to install platform-specific crash handlers (cf. | |
bool | installSignalHandler = true |
Flag whether to install platform-specific signal handlers (cf. Framework::installSignalHandlers()). | |
bool | initSettings = true |
Flag whether to initialize GlobalSettings. | |
std::string | organizationName = "ImFusion" |
Name of the organization to use for settings storage and other contexts. | |
std::string | applicationName = "ImFusionLib" |
Name of the application to use for settings storage and other contexts. | |
Flags<Log::ConsoleSink::Options> consoleSinkOptions |
std::unique_ptr<GL::Context> glContext |
Optional OpenGL context to use as main context for the framework.
Use this for instance to enable context sharing with a context of your host application.
std::function<void()> licenseInitFunction = defaultLicenseInitFunction() |
Function will be called once during framework initialization just before checking the license state.
Enables you to implement a custom license-initialization function. The default tries to use the environment variable IMFUSION_LICENSE_KEY
if no license is active (cf. Framework::defaultLicenseInitFunction()).
std::function<void(const std::string& errMsg, int gracePeriodSec)> licenseExpirationHandler |
Optional function to handle the case when a license expiration happens during runtime.
Please use this to terminate your application gracefully within a given grace period (handler parameter in seconds). After the grace period expires ImFusion::Framework will be forcefully de-initialized, which could tier down your application un-gracefully.
Example code for a Qt application:
std::optional<bool> installCrashHandler = std::nullopt |
Flag whether to install platform-specific crash handlers (cf.
Platform::installCrashHandler()). If it contains std::nullopt, it will fall back toinstallSignalHandlers. This is done to maintain backwards compatibility.