Changeset 182 in pacpusframework for trunk/src/PacpusLib/ComponentManager.cpp


Ignore:
Timestamp:
Oct 23, 2013, 9:09:51 AM (11 years ago)
Author:
Marek Kurdej
Message:

Fixed: dependencies in InputOutputBase, ConnectionBase.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/PacpusLib/ComponentManager.cpp

    r176 r182  
    1010#include <Pacpus/kernel/ComponentBase.h>
    1111#include <Pacpus/kernel/ConnectionBase.h>
     12#include <Pacpus/kernel/InputOutputBase.h>
    1213#include <Pacpus/kernel/Log.h>
     14#include <QDomNodeList>
    1315#include <QObject>
    14 #include <QDomNodeList>
    15 
     16
     17using namespace pacpus;
    1618using namespace pacpus;
    1719
     
    186188    QStringList input  = inputSignature.split(".");
    187189
    188     if(getComponent(output[0])==NULL) {
     190    if (getComponent(output[0])==NULL) {
    189191        LOG_WARN("cannot make connection : component " << output[0] << " not found");
    190192        return false;}
    191     if(getComponent(output[0])->getOutput(output[1]) == NULL) {
     193    if (getComponent(output[0])->getOutput(output[1]) == NULL) {
    192194        LOG_WARN("cannot make connection : component " << output[0] << " doesn't have output " << output[1]);
    193195        return false;}
    194     if(getComponent(input[0])==NULL) {
     196    if (getComponent(input[0])==NULL) {
    195197        LOG_WARN("cannot make connection : component " << input[0] << " not found");
    196198        return false;}
    197     if(getComponent(input[0])->getInput(input[1]) == NULL) {
     199    if (getComponent(input[0])->getInput(input[1]) == NULL) {
    198200        LOG_WARN("cannot make connection : component " << input[0] << " doesn't have intput " << input[1]);
    199201        return false;}
    200202
    201203    // NOTE Create communicationInterface if needed ??
    202 
    203     return connectInterface(getComponent(output[0])->getOutput(output[1]), getComponent(input[0])->getInput(input[1]), priority);
     204    return connectInterface(
     205        getComponent(output[0])->getOutput(output[1]),
     206        getComponent(input[0])->getInput(input[1]),
     207        priority
     208    );
    204209
    205210}
Note: See TracChangeset for help on using the changeset viewer.