|
| static bool | start () |
| | Creates all Singletons and calls init() on Components in the correct order The function ensures that all dependencies marked with "dependsOn" are respected. More...
|
| |
| static bool | stop () |
| | Deletes all Singleton Instances and calls deinit() on all Components The Singleton Instances and Components are called in reversed order compared to the startup. More...
|
| |
|
static void | registerHandlers () |
| | Registers the start and stop function at QApplication so that they will be called on appstart/appterm It's safe to call this function multiple times.
|
| |
| static bool | getClassesRecursive (QStringList backtrace, QStringList &globalDependencies, const ObjectState &object) |
| | getClassesRecursive gets all classes and their dependencies starting from the passed ObjectState. More...
|
| |
| static void | addComponentHelper (const QMetaObject &metaobj, internal::VoidFnPtr initFunc, internal::VoidFnPtr deinitFunc) |
| | addComponentHelper adds a component to the list of "tracked" modules More...
|
| |
| static void | addSingletonHelper (const QMetaObject &metaobj) |
| | addSingletonHelper adds a singleton to the list of "tracked" modules More...
|
| |
| static ObjectState * | findClass (QString classname) |
| | findClass finds a class in the list of registerd classes by name More...
|
| |
◆ addComponentHelper()
| void StartupHelperPrivate::addComponentHelper |
( |
const QMetaObject & |
metaobj, |
|
|
internal::VoidFnPtr |
initFunc, |
|
|
internal::VoidFnPtr |
deinitFunc |
|
) |
| |
|
static |
addComponentHelper adds a component to the list of "tracked" modules
- Parameters
-
| metaobj | the metaobject of the component to add |
| initFunc | a function pointer to the static init() function of the class or a nullptr |
| deinitFunc | a function pointer to the static deinit() function of the class or a nullptr |
◆ addSingletonHelper()
| void StartupHelperPrivate::addSingletonHelper |
( |
const QMetaObject & |
metaobj | ) |
|
|
static |
addSingletonHelper adds a singleton to the list of "tracked" modules
- Parameters
-
| metaobj | the metaobject of the singleton to add |
◆ findClass()
| ObjectState * StartupHelperPrivate::findClass |
( |
QString |
classname | ) |
|
|
static |
findClass finds a class in the list of registerd classes by name
- Parameters
-
| classname | name of the class to find |
- Returns
- pointer to ObjectState or nullptr if not found
◆ getClassesRecursive()
| bool StartupHelperPrivate::getClassesRecursive |
( |
QStringList |
backtrace, |
|
|
QStringList & |
globalDependencies, |
|
|
const ObjectState & |
object |
|
) |
| |
|
static |
getClassesRecursive gets all classes and their dependencies starting from the passed ObjectState.
- Parameters
-
| backtrace | the list of classes which depend on the current class |
| globalDependencies | the ordered list of classes which should be extended |
| object | the class to start with |
- Returns
- true if dependencies are fine, false if we have missing or circular dependencies
◆ start()
| bool StartupHelperPrivate::start |
( |
| ) |
|
|
static |
Creates all Singletons and calls init() on Components in the correct order The function ensures that all dependencies marked with "dependsOn" are respected.
- Returns
- true if creation of all singletons, calling init() on all components and postInit() on all singletons succeeded.
◆ stop()
| bool StartupHelperPrivate::stop |
( |
| ) |
|
|
static |
Deletes all Singleton Instances and calls deinit() on all Components The Singleton Instances and Components are called in reversed order compared to the startup.
- Returns
- true if calling preDestroy() on all singletons, deinit() on all components and deleting all singletons succeeded
The documentation for this class was generated from the following files:
- itemframework/itemframework/src/helper/startup_helper_p.h
- itemframework/itemframework/src/helper/startup_helper.cpp