|
roviz
0.7
Code Documentation of roviz
|
The StartupHelper class manages dependencies between global singletons and other components. It ensures that the singletons/components are constructed/deleted in the right order. More...
#include <startup_helper.h>

Static Public Member Functions | |
| template<class T > | |
| static void | addSingleton () |
| Adds a Singleton to the Helper. The Singleton will be constructed after it's dependencies. Dependencies can be marked by adding a Q_CLASSINFO "dependsOn" or "optionallyDependsOn" to the class definition. . More... | |
| template<class T > | |
| static void | addComponent () |
| Adds a component to the Helper. The StartupHelper will call init() and deinit() on the component class. Every class with at least a static void init() or void deinit() function can be specified. Dependencies can be marked by adding a Q_CLASSINFO "dependsOn" or "optionallyDependsOn" to the class definition. (see addSingleton() ). The components must use the Q_GADET or Q_OBJECT macro. You must either call this function before running QCoreApplication::exec() or use STARTUP_ADD_COMPONENT(). | |
| static void | ensureCoreGetsLinked () |
| This function does nothing. But you can call it if you want to make sure that this translation unit is not optimized out by the linker. | |
The StartupHelper class manages dependencies between global singletons and other components. It ensures that the singletons/components are constructed/deleted in the right order.
|
inlinestatic |
Adds a Singleton to the Helper. The Singleton will be constructed after it's dependencies.
Dependencies can be marked by adding a Q_CLASSINFO "dependsOn" or "optionallyDependsOn" to the class definition.
.
Singleton must use the Q_GADGET or Q_OBJECT macro and derive from AbstractSingleton.
You must either call this function before running QCoreApplication::exec() or use STARTUP_ADD_SINGLETON().
1.8.13