Changeset 185 in pacpusframework for trunk/src/PacpusLib


Ignore:
Timestamp:
10/23/13 10:32:21 (11 years ago)
Author:
morasjul
Message:

Fixed: dependencies.

Location:
trunk/src/PacpusLib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/PacpusLib/CMakeLists.txt

    r182 r185  
    1111create_export(EXPORT_HDR ${PROJECT_NAME} "${PACPUS_INCLUDE_DIR}/Pacpus/kernel")
    1212
    13 # ========================================
    14 # Configure qt4
    15 # ========================================
    16 #if(QT4_FOUND)
    17 #    set(QT_USE_QTXML true)
    18 #    include(${QT_USE_FILE})
    19 #else()
    20 #    message(ERROR "Qt4 needed")
    21 #endif()
    22 
    23 
    24 # ========================================
    25 # Compiler definitions
    26 # ========================================
     13################################################################################
    2714add_definitions(
    2815    -DQT_NO_KEYWORDS
     
    3017)
    3118
    32 # ========================================
    33 # Include directories
    34 # ========================================
     19################################################################################
     20# INCLUDES
    3521include_directories(
    3622    ${QT_INCLUDE_DIR}
    3723)
    3824
    39 # ========================================
    40 # Link directories
    41 # ========================================
     25################################################################################
     26# LINK
    4227link_directories(
    4328    ${PROJECT_BINARY_DIR}/../RoadTime
     
    4530)
    4631
    47 # ========================================
    48 # List of sources
    49 # ========================================
     32################################################################################
     33# FILES
    5034set(PROJECT_HDRS
    5135    ${EXPORT_HDR}
     36
    5237    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/cstdint.h
    5338    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ComponentBase.h
     
    8974)
    9075
    91 qt_wrap_cpp(
    92      PROJECT_MOC_SRCS
    93      ${FILES_TO_MOC}
    94  )
    95 
    96 # ========================================
    97 # Build a library
    98 # ========================================
     76qt_wrap_cpp(PROJECT_MOC_SRCS
     77    ${FILES_TO_MOC}
     78)
     79 
     80################################################################################
     81# BUILD AND LINK
    9982pacpus_add_library(${PROJECT_NAME} SHARED
    10083    ${PROJECT_HDRS}
     
    10992endif()
    11093
    111 # ========================================
    112 # Libraries
    113 # ========================================
     94################################################################################
     95# LIBS
    11496target_link_libraries(
    11597    ${PROJECT_NAME}
     
    119101)
    120102
    121 # ========================================
    122 # Install
    123 # ========================================
     103################################################################################
     104# INSTALL
    124105pacpus_install(${PROJECT_NAME})
    125106
    126 # ========================================
    127 # Folder
    128 # ========================================
     107################################################################################
     108# FOLDER
    129109pacpus_folder(${PROJECT_NAME} "libraries")
  • trunk/src/PacpusLib/ComponentManager.cpp

    r184 r185  
    1818
    1919DECLARE_STATIC_LOGGER("pacpus.core.ComponentManager");
     20
     21////////////////////////////////////////////////////////////////////////////////
     22
     23bool connectInterface(OutputInterfaceBase * out, InputInterfaceBase * in, int priority, InputInterfaceBase::ReadingMode mode = InputInterfaceBase::GetLast);
     24
     25////////////////////////////////////////////////////////////////////////////////
     26
     27bool 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////////////////////////////////////////////////////////////////////////////////
    2043
    2144ComponentManager * ComponentManager::mInstance = NULL;
  • trunk/src/PacpusLib/InputOutputBase.cpp

    r182 r185  
    9797}
    9898
    99 const InputInterfaceBase::ReadingMode & InputInterfaceBase::readingMode() const
     99const InputInterfaceBase::ReadingMode & InputInterfaceBase::getReadingMode() const
    100100{
    101101    return m_readingMode;
Note: See TracChangeset for help on using the changeset viewer.