![]() |
Carousel
|
The IComponentManager holds information about the components that can be used by the application. More...
#include <IComponentManager.h>
Inherits QObject.
Inherited by ComponentManager.
Signals | |
void | aboutToShutDown () |
void | componentAboutToShutDown (IComponent *component) |
void | componentShutDown (IComponent *component) |
void | componentStarted (IComponent *component) |
void | startedUp () |
Public Member Functions | |
virtual bool | addComponent (IComponent *component)=0 |
virtual DependenciesSolvingResult | check ()=0 |
virtual const ObservableList < IComponent * > & | components () const =0 |
virtual const IComponentDependencies & | dependencies () const =0 |
virtual bool | isChecked () const =0 |
virtual QStringList | missingComponents () const =0 |
virtual QList< IComponent * > | orphanComponents () const =0 |
virtual IServiceLocator * | serviceLocator () const =0 |
virtual void | shutdown ()=0 |
virtual DependenciesSolvingResult | shutdownAllComponents ()=0 |
virtual DependenciesSolvingResult | shutdownComponent (IComponent *component)=0 |
virtual DependenciesSolvingResult | shutdownComponents (const QList< IComponent * > &components)=0 |
virtual QList< IComponent * > | startedComponents () const =0 |
virtual DependenciesSolvingResult | startup ()=0 |
virtual DependenciesSolvingResult | startupAllComponents ()=0 |
virtual DependenciesSolvingResult | startupComponent (IComponent *component)=0 |
virtual DependenciesSolvingResult | startupComponents (QList< IComponent * > components)=0 |
virtual QList< IComponent * > | stoppedComponents () const =0 |
![]() | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
Properties | |
QList< IComponent * > | orphanComponents |
QList< IComponent * > | startedComponents |
QList< IComponent * > | stoppedComponents |
![]() | |
objectName | |
Additional Inherited Members | |
![]() | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
![]() | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
![]() | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
The IComponentManager holds information about the components that can be used by the application.
Each component (described in a IComponent and ComponentDefinition classes, stores the name, description and availability of the component) that was statically registered or dynamically discovered by providers will be added to the ComponentManager after boot loading sequence in CarouselBootloader::configureComponentManager() method. Components also can be added and started during run-time.
Then, after checking and resolving dependencies, all enabled components will be started with IServiceLocator reference as initialziation data. It enables components to get access to shared servces of your application.
Also manager uses IComponentDependencies for components sorting and finding components dependencies.
|
pure virtual |
Adds a new component. Component with same name should not already exists in the manager.
A newly is appended to the stoppedComponents() list and to the dependencies(). This method sets isChecked() to false.
component | If manager already has component with same name as component - the last one will not be added to the manager. The same for the null pointer - it will be ignored. |
Returns true if component was succesfully added. If it is a null point or already existed one - returns false. Note, that IComponentManager does not take ownership for component, which was not successfully added.
Implemented in ComponentManager.
|
pure virtual |
Uses DependencySolver for checking of added components according to their dependencies.
Returns a dependencies solving result, that contains a list of distinct components and a list of components, those dependencies were not found.
It caches resulting value for prefomance, but addComponent() is resets it.
Implemented in ComponentManager.
|
pure virtual |
Returns a list of all added components. It is a shortcut to the IComponentDependencies::components().
Implemented in ComponentManager.
|
pure virtual |
Returns a component dependencies.
Implemented in ComponentManager.
|
pure virtual |
Uses DependencySolver for checking of added components according to their dependencies.
Returns a dependencies solving result, that contains a list of distinct components and a list of components, those dependencies were not found.
Implemented in ComponentManager.
|
pure virtual |
Gets an initialization data that will be passed to the started components.
Implemented in ComponentManager.
|
pure virtual |
Returns a list of missing parent names those children were added to the manager.
This list is populated after check() or startup/shutdown components and resets after the addComponent() call.
Implemented in ComponentManager.
|
pure virtual |
Returns a list of components those parents were not added to the manager while components were started.
This list is populated after check() or startup/shutdown components and resets after the addComponent() call.
Implemented in ComponentManager.
|
pure virtual |
Returns a list of already stopped or non-started yet components.
Implemented in ComponentManager.
|
pure virtual |
Returns a list of started components.
Implemented in ComponentManager.
|
pure virtual |
Shuts down all the components. Call this method when your application is going to quit.
Implemented in ComponentManager.
|
pure virtual |
Shuts down the specified component and all its implicit children, obtained by IComponentDependencies::completeListWithParent() in such order, that children will be shut down first.
Shut component is moved from the startedComponents() to the stoppedComponents() list.
Ignores null pointer or unexisting component.
Returns a DependenciesSolvingResult with components that were realy shut down. Components that already were shut down will not appear to the result list.
Implemented in ComponentManager.
|
pure virtual |
This method is added for convinient. It is a shortkey to the shutdownComponents(components()).
Returns a DependenciesSolvingResult with components that were realy shut down. Components that already were shut down will not appear to the result list.
Implemented in ComponentManager.
|
pure virtual |
Shuts down specified components in such order, that children will be shut down before their parents.
Shut components are moved from the startedComponents() to the stoppedComponents() list.
Returns a DependenciesSolvingResult with components that were realy shut down. Components that already were shut down will not appear to the result list.
Implemented in ComponentManager.
|
pure virtual |
Begins working and starts components which were added on the start of application. Starts only enabled components.
Components with disabled parent components will not be started.
Initialization data will be passed to the started components (if any).
Implemented in ComponentManager.
|
pure virtual |
Implicitly calls check() and starts (if resolving) up the specified components and all its parents, obtained by IComponentDependencies::completeListWithChild() in such order, that parents will be started first. All started components became enabled.
Components will not start if parent component could not start.
Initialization data will be passed to the started components (if any). Returns a dependencies solving result, that contains a list of distinct components and a list of components, those dependencies were not found.
All started components will be moved from the stoppedComponents() to the startedComponents() list.
Returns a DependenciesSolvingResult with components that were realy started. Components that already were started will not appear to the result list.
Implemented in ComponentManager.
|
pure virtual |
This method is added for convinient. It is a shortkey to the startupComponents(components()).
Initialization data will be passed to the started components (if any).
Returns a DependenciesSolvingResult with components that were realy started. Components that already were started will not appear to the result list.
Implemented in ComponentManager.
|
pure virtual |
Implicitly calls check() and starts (if resolving) up the specified components and all its parents, obtained by IComponentDependencies::completeListWithChild() in such order, that parents will be started first. All started components became enabled.
Components will not start if parent component could not start.
Initialization data will be passed to the started components (if any). Returns a dependencies solving result, that contains a list of distinct components and a list of components, those dependencies were not found.
Components, those parents were not added to manager, will be appended to the orphanComponents() list and names of their missing parents will be appended to the missingComponents() list. All started components will be moved from the stoppedComponents() to the startedComponents() list.
Returns a DependenciesSolvingResult with components that were realy started. Components that already were started will not appear to the result list.
Implemented in ComponentManager.
|
signal |
This signal is emmited before manager will be shut down.
|
signal |
This signal is emmited after manager startup() call.
|
signal |
This signal is emmited before component will be shut down by the IComponentManager.
|
signal |
This signal is emmited when component is shut down by the IComponentManager.
|
signal |
This signal is emmited when component is started up by the IComponentManager.