SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Macros
AutoInit.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define smtkAutoInitComponentMacro(C)
 
#define smtkAutoInitConstructMacro(C)   C##_AutoInit_Construct();
 
#define smtkAutoInitDestructMacro(C)   C##_AutoInit_Destruct();
 
#define smtkComponentInitMacro(C)
 Register an SMTK component for use. More...
 

Macro Definition Documentation

◆ smtkAutoInitComponentMacro

#define smtkAutoInitComponentMacro (   C)
Value:
void C##_AutoInit_Construct(); \
void C##_AutoInit_Destruct();

◆ smtkComponentInitMacro

#define smtkComponentInitMacro (   C)
Value:
smtkAutoInitComponentMacro(C) static struct C##_ComponentInit \
{ \
/* Call <mod>_AutoInit_Construct during initialization. */ \
C##_ComponentInit() { smtkAutoInitConstructMacro(C) } \
/* Call <mod>_AutoInit_Destruct during finalization. */ \
~C##_ComponentInit() { smtkAutoInitDestructMacro(C) } \
} C##_ComponentInit_Instance;

Register an SMTK component for use.

Initialize the named SMTK component (such as a modeling kernel), ensuring it is correctly registered and unregistered. This call must be made in global scope in the translation unit of your executable (which can include code built into a shared library linked to your executable, but will not work as expected in code linked to your executable as part of a static library).

#include "vtkAutoInit.h"
smtkComponentInitMacro(smtk_cgm_session);

If included in the global scope, the above snippet will ensure the global function smtk_cgm_session_AutoInit_Construct is called during dynamic C++ initialization and and the global function smtk_cgm_session_AutoInit_Destruct is called during finalization.

smtkComponentInitMacro
#define smtkComponentInitMacro(C)
Register an SMTK component for use.
Definition: AutoInit.h:46