![]() |
Carousel
|
It is the default implementation of the IComponentDependencies. More...
#include <ComponentDependencies.h>
Inherits QObject, and IComponentDependencies.
Public Member Functions | |
ComponentDependencies (QObject *parent=nullptr) | |
bool | addComponent (IComponent *component) |
DependenciesSolvingResult | completeListWithChild (IComponent *forChild) const |
DependenciesSolvingResult | completeListWithChildren (const QList< IComponent * > &forChildren) const |
DependenciesSolvingResult | completeListWithParent (IComponent *forParent) const |
DependenciesSolvingResult | completeListWithParents (const QList< IComponent * > &forParents) const |
IComponent * | componentByName (const QString &byName) const |
const ObservableList < IComponent * > & | components () const |
DependenciesSolvingResult | getChildComponents (const IComponent *forParent) const |
QList< IComponent * > | getParentDefinitions (const IComponent *forChild) const |
DependenciesSolvingResult | orderedComponents () const |
![]() | |
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 |
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) |
![]() | |
objectName | |
It is the default implementation of the IComponentDependencies.
ComponentManager uses this class by default.
Each component (described in a IComponent and IComponentDescriptionExtension classes, stores the name, description and availability of the component) that statically registered or dynamically discovered by providers will be added to the IComponentDependencies through IComponentManager after boot loading sequence in CarouselBootloader::configureComponentManager() method.
Also ComponentDependencies uses DependencySolver for components sorting and finding components dependencies.
Then you can get any dependnecies between the components using specified methods.
|
virtual |
Adds a new component. Component with same name should not already exists in.
component | If IComponentDependencies already has component with same name as component
|
Returns true if component was succesfully added. If it is a null point or already existed one - returns false.
Implements IComponentDependencies.
|
virtual |
Returns a dependencies solving result, that contains a list of distinct components and a list of components, those dependencies were not found. The component list will contains all immediate and extended parents for specified child component.
The components are ordered in such way, that parents are firsts and child is last. E.g. if you have following graph
and you call completeListWithChild() for the C component, the A, B and C components will be returned in that order.
forChild | The component to get the dependencies (or parents) for. |
Implements IComponentDependencies.
|
virtual |
Returns a dependencies solving result, that contains a list of distinct components and a list of components, those dependencies were not found. The component list will contains all immediate and extended parents for specified children components.
The components are ordered in such way, that parents are firsts and children are last.
forChildren | The components to get the dependencies (or parents) for. |
Implements IComponentDependencies.
|
virtual |
Returns a dependencies solving result, that contains a list of distinct components and a list of components, those dependencies were not found. The component list will contains all immediate and extended children for specified parent component.
The components are ordered in such way, that children are firsts and parent is last. E.g. if you have following graph
and you call completeListWithParent() for the C component, the E, D and C components will be returned in such order, where indexOf(E) < indexOf(C) and indexOf(D) < indexOf(C).
forParent | The component to get the components that depend on it (or its implicit children). |
Implements IComponentDependencies.
|
virtual |
Returns a dependencies solving result, that contains a list of distinct components and a list of components, those dependencies were not found. The component list will contains all immediate and extended children for specified parents components.
The components are ordered in such way, that children are firsts and parents are last. E.g. if you have following graph
and you call completeListWithParents() for the C component, the E, D and C components will be returned in such order, where indexOf(E) < indexOf(C) and indexOf(D) < indexOf(C).
forParents | The components to get the other components that depend on they (or their implicit children). |
Implements IComponentDependencies.
|
virtual |
Finds the component by its name. Null pointer, if list is empty, or if component with specified name was not added.
Implements IComponentDependencies.
|
virtual |
Returns a list of added components.
Implements IComponentDependencies.
|
virtual |
Returns a list of all parents (direct and indirect) for the specified child component.
then, getParentDefinitions(E) will return {A, B, C, D} components.
forChild | The component to get the dependencies (or parents) for. If forChild is null - result with empty collections will be returned. |
Implements IComponentDependencies.
|
virtual |
Returns a dependencies solving result for cpecified parent, that contains a list of distinct components and a list of components, those dependencies were not found. E.g. if we have components
then, getChildComponents(C) will return {E, D} components.
forParent | The component to get the other components that depend on it (or its implicit children). If forParent is null or component with such name does not exists - result with empty collections will be returned. |
Implements IComponentDependencies.
|
virtual |
Returns a dependencies solving result for all components, that contains a list of distinct components and a list of components, those dependencies were not found. The component list will contains all immediate and extended parents for specified children components.
The components are ordered in such way, that parents are firsts and children are lasts.
It is a shortkey for the
Implements IComponentDependencies.