Changeset 185 in pacpusframework for trunk/src/PacpusLib/ComponentManager.cpp
- Timestamp:
- Oct 23, 2013, 10:32:21 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/PacpusLib/ComponentManager.cpp
r184 r185 18 18 19 19 DECLARE_STATIC_LOGGER("pacpus.core.ComponentManager"); 20 21 //////////////////////////////////////////////////////////////////////////////// 22 23 bool connectInterface(OutputInterfaceBase * out, InputInterfaceBase * in, int priority, InputInterfaceBase::ReadingMode mode = InputInterfaceBase::GetLast); 24 25 //////////////////////////////////////////////////////////////////////////////// 26 27 bool connectInterface(OutputInterfaceBase * out, InputInterfaceBase * in, int priority, InputInterfaceBase::ReadingMode mode) 28 { 29 if (out->getDataType() == in->getDataType() || out->getDataType() == QString(typeid(QByteArray).name()) || in->getDataType() == QString(typeid(QByteArray).name())) { 30 // Add connection 31 out->addConnection(ConnectionBase(in, priority)); // TODO make connect function 32 in->addConnection(ConnectionBase(out, priority)); 33 in->setReadingMode(mode); 34 //LOG_INFO("connection : Output " << out->getSignature() << " => Input " << in->getSignature()); 35 return true; 36 } else { 37 //LOG_WARN("connecting " << out->getSignature() << ":" << out->getDataType() << " to " << in->getSignature() << ":" << in->getDataType() << " failled : DataType incompatible " << QString(typeid(QByteArray).name())); 38 return false; 39 } 40 } 41 42 //////////////////////////////////////////////////////////////////////////////// 20 43 21 44 ComponentManager * ComponentManager::mInstance = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.