CRCPlugin.h
Macro Definitions
Types
Type Aliases
void(* |
|
int(* |
|
void(* |
|
void(* |
|
void(* |
|
Functions
Detailed Description
Macro Definition
-
CRC_RET_SUCCESS
-
CRC_RET_FAIL
-
CRC_PLUGIN_EXPORT
Type Alias Documentation
-
typedef CRCResultCalculator *(*CRC_CreateCalculatorFunc)()
Type definition of function pointer for creating new CRCResultCalculator instances.
-
typedef void (*CRC_DestroyCalculatorFunc)(CRCResultCalculator *calcObjPtr)
Type definition of function pointer for deleting CRCResultCalculator instances.
-
typedef int (*CRC_RegisterCalculatorFunc)(const char *calculatorIdString, const CRC_RegisterCalculatorParams *params)
Type definition of the function pointer for registering result calculators with the plugin manager.
-
typedef void (*CRC_LogFunc)(int level, const char *message)
Type definition of log function provided by the framework.
Log levels are 1=error, 2=warning, 3=info, 4=debug
-
typedef void (*CRC_SetPluginInfoFunc)(const char *key, const char *value)
Type definition of function provided by the framework for setting plugin information in the form of key, value pairs.
-
typedef void (*CRC_PluginExitFunc)()
Type definition of the plugin exit function pointer.
(used by the plugin manager to tell plugins to cleanup before being unloaded)
-
typedef CRC_PluginExitFunc (*CRC_PluginInitFunc)(const CRC_FrameworkServices *frameworkServices)
Type definition definition of the plugin initialization function pointer (used by plugin manager to initialize plugins)
Note that the return type is the CRC_PluginExitFunc (used by plugin manager to tell plugins to cleanup). If initialization failed for any reason, it must return NULL to let the plugin manger know that the plugin wasn’t initialized properly. The plugin should use the framework services to register the result calculators it exports as well as communicating log messages.
Function Documentation
-
CRC_PluginExitFunc initializeResultCalculatorPlugin(const CRC_FrameworkServices *frameworkServices)
Named exported entry point into the plugin.
This definition is required even though the function is loaded from a dynamic library by name and cast to CRC_PluginInitFunc If this declaration is commented out DynamicLibrary::getSymbol() fails The plugin’s initialization function MUST be called “initializeResultCalculatorPlugin” and conform to the CRC_PluginInitFunc signature.