roviz  0.7
Code Documentation of roviz
Static Public Member Functions | List of all members
StartupHelperPrivate Class Reference
Collaboration diagram for StartupHelperPrivate:
Collaboration graph

Static Public Member Functions

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 ObjectStatefindClass (QString classname)
 findClass finds a class in the list of registerd classes by name More...
 

Member Function Documentation

◆ 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
metaobjthe metaobject of the component to add
initFunca function pointer to the static init() function of the class or a nullptr
deinitFunca function pointer to the static deinit() function of the class or a nullptr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addSingletonHelper()

void StartupHelperPrivate::addSingletonHelper ( const QMetaObject &  metaobj)
static

addSingletonHelper adds a singleton to the list of "tracked" modules

Parameters
metaobjthe metaobject of the singleton to add
Here is the call graph for this function:
Here is the caller graph for this function:

◆ findClass()

ObjectState * StartupHelperPrivate::findClass ( QString  classname)
static

findClass finds a class in the list of registerd classes by name

Parameters
classnamename of the class to find
Returns
pointer to ObjectState or nullptr if not found
Here is the caller graph for this function:

◆ 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
backtracethe list of classes which depend on the current class
globalDependenciesthe ordered list of classes which should be extended
objectthe class to start with
Returns
true if dependencies are fine, false if we have missing or circular dependencies
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: