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


Ignore:
Timestamp:
Oct 29, 2013, 3:40:48 PM (11 years ago)
Author:
Marek Kurdej
Message:

Added: OutputInterface::checkedSend.
Added: ComponentManager: prints InputsMap, OutputsMap.

File:
1 edited

Legend:

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

    r201 r202  
    1717#include <QDomNodeList>
    1818#include <QObject>
     19#include <QList>
     20#include <ostream>
    1921
    2022using namespace pacpus;
     23
     24template <typename _Elem, typename _Traits, typename _ListElem>
     25std::basic_ostream<_Elem, _Traits> & operator<<(std::basic_ostream<_Elem, _Traits> & os, const QList<_ListElem> & list)
     26{
     27    typedef QList<_ListElem> ListType;
     28    for (ListType::const_iterator it = list.cbegin(), itend = list.cend(); it != itend; ++it) {
     29        os << *it << "\n";
     30    }
     31    return os;
     32}
    2133
    2234DECLARE_STATIC_LOGGER("pacpus.core.ComponentManager");
     
    316328        }
    317329         
    318         // Pacpus 2.0 : add inputs and outputs
     330        // add inputs and outputs
    319331        component->addInputs();
    320332        component->addOutputs();
     333        // print inputs and outputs
     334        LOG_INFO("Inputs: " << component->inputs().keys());
     335        LOG_INFO("Outputs: " << component->outputs().keys());
    321336
    322337        if (ComponentBase::CONFIGURATION_DELAYED == component->configurationState()) {
Note: See TracChangeset for help on using the changeset viewer.