Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Data Structures | Macros
DE_PluginHolder.hxx File Reference
#include <DE_Wrapper.hxx>
#include <mutex>
#include <tuple>

Data Structures

class  DE_PluginHolder< TheConfType >
 Base class to work with DE_Wrapper global registration of components. Control life-time of current configuration node. In creating stage load into global configuration. On destroying stage unload from global configuration. Operation to load/unload are thread safety. More...
 
class  DE_MultiPluginHolder< TheConfTypes >
 Helper class for variadic plugin registration. Allows registration of multiple configuration node types simultaneously. More...
 

Macros

#define DEPLUGIN(theNodeType, ...)
 Macro to define plugin factory function for DE_Wrapper configuration nodes.
 

Macro Definition Documentation

◆ DEPLUGIN

#define DEPLUGIN ( theNodeType,
... )
Value:
extern "C" Standard_EXPORT void PLUGINFACTORY() \
{ \
}
Helper class for variadic plugin registration. Allows registration of multiple configuration node typ...
Definition DE_PluginHolder.hxx:52

Macro to define plugin factory function for DE_Wrapper configuration nodes.

Parameters
[in]theNodeType- first configuration node class to instantiate
[in]...- additional configuration node classes to instantiate (optional) Needs to be called after loading of the library to register configuration nodes.

Example of usage:

// Inside implementation of the configuration node source file:
// For multiple node types:
#define DEPLUGIN(theNodeType,...)
Macro to define plugin factory function for DE_Wrapper configuration nodes.
Definition DE_PluginHolder.hxx:104
The purpose of this class is to configure the transfer process for IGES format Stores the necessary s...
Definition DEIGES_ConfigurationNode.hxx:32
The purpose of this class is to configure the transfer process for STEP format Stores the necessary s...
Definition DESTEP_ConfigurationNode.hxx:34
The purpose of this class is to configure the transfer process for VRML format Stores the necessary s...
Definition DEVRML_ConfigurationNode.hxx:31

After loading of the library TKDESTEP:

OSD_SharedLibrary aSharedLibrary("libTKDESTEP.so");
if (!aSharedLibrary.DlOpen(OSD_RTLD_LAZY))
{
// Error handling
return;
}
typedef void (*PluginFactoryFunc)();
PluginFactoryFunc aFunc = (PluginFactoryFunc)aSharedLibrary.DlSymb("PLUGINFACTORY");
if (aFunc == NULL)
{
// Error handling
return;
}
aFunc(); // Call factory function to register configuration nodes
@ OSD_RTLD_LAZY
Definition OSD_LoadMode.hxx:21
typedef void(APIENTRYP PFNGLDRAWRANGEELEMENTSPROC)(GLenum mode
Interface to dynamic library loader. Provides tools to load a shared library and retrieve the address...
Definition OSD_SharedLibrary.hxx:31

Will create instances of all specified configuration nodes and set them to DE_Wrapper global configuration.

Note: if OCCT_NO_PLUGINS is defined, macro does nothing.