|
Base Module
VST 3.6.6
SDK for developing VST Plug-in
|
Manager for initialization & termination code. More...
#include <finitializer.h>
Public Member Functions | |
| OneTimeProcedure (bool isInit, InitTermFunc f=0, FIDString name=0, uint32 level=kInitLevelStd) | |
| Register an initialization (isInit = true) or termination (isInit=false) procedure (f) for execution. For convenience, use the INITIALIZE & TERMINATE macros instead of this. More... | |
Static Public Member Functions | |
| static bool | initialize (uint32 untilLevel=kInitLevelLast) |
| Execute & discard all registered initialization procedures. If there are different code spots where to execute certain kinds of initialization, utilize initialization levels (see enum InitLevel). More... | |
| static bool | terminate () |
| Execute & discard all registered termination procedures. More... | |
| static void | cancel () |
| Discard any initialization/termination procedures registered. More... | |
Manager for initialization & termination code.
With this, you may register code to be executed at program startup and/or termination.
This is useful when there is class specific code you need to be executed at program startup/termination, but you want to keep it in the classes source file to keep together the class code.
The steps are:
| OneTimeProcedure | ( | bool | isInit, |
| InitTermFunc | f = 0, |
||
| FIDString | name = 0, |
||
| uint32 | level = kInitLevelStd |
||
| ) |
Register an initialization (isInit = true) or termination (isInit=false) procedure (f) for execution. For convenience, use the INITIALIZE & TERMINATE macros instead of this.
|
static |
Execute & discard all registered initialization procedures. If there are different code spots where to execute certain kinds of initialization, utilize initialization levels (see enum InitLevel).
|
static |
Execute & discard all registered termination procedures.
|
static |
Discard any initialization/termination procedures registered.