carb::StartupFrameworkDesc

Defined in carb/StartupUtils.h

struct StartupFrameworkDesc

Parameters passed to carb::startupFramework().

Public Members

const char *configString

A string containing either one of two things:

  • A path to a configuration file.

  • A raw string contain the configuration (in either JSON or TOML format based on configFormat ).

carb::startupFramework() will first check to see if the string maps to an existing file, and if not, the string is treated as a raw configuration string.

char **argv

Array of command line arguments.

int argc

Number of command line arguments.

const char *const *initialPluginsSearchPaths

An array of search paths for plugins.

Relative search paths are relative to the executable’s directory, not the current working directory.

These search paths will be used when loading the base set of carbonite plugins (such as carb.settings.plugin), then this will be set as the default value for the carb::settings::ISettings key /pluginSearchPaths (this allows the setting to be overridden if you set it in config.toml or pass it on the command line).

Passing an empty array will result in the executable directory being used as the default search path.

This option is needed when the base set of Carbonite plugins are not inside of the executable’s directory; otherwise, /pluginSearchPaths could be set in config.toml or via the command line.

Defaults to nullptr.

size_t initialPluginsSearchPathCount

Size of array of paths to search for plugins.

const char *cmdLineParamPrefix

Prefix of command line arguments serving as overrides for configuration values. Default is --/.

const char *envVarsParamPrefix

Prefix of environment variables serving as overrides for configuration values. Default is OMNI_APPNAME_.

const char *configFormat

The selected config format (“toml”, “json”, etc). Default is “toml”.

const char *appNameOverride

Override automatic app name search. Defaults to nullptr.

const char *appPathOverride

Override automatic app path search. Defaults to nullptr.

bool disableCrashReporter

If true, the crash reporter plugin will not be loaded. Defaults to false.

PluginLoadingDesc pluginLoadingDesc

Optional plugin loading description. This allows the default plugin loading list to be overridden programmatically instead of depending on a config file for an app.

Public Static Functions

static inline StartupFrameworkDesc getDefault()

Returns a StartupFrameworkDesc with default values.