Changeset 104:5372e8ecac13 in finroc_plugins_data_ports


Ignore:
Timestamp:
18.02.2016 13:38:21 (4 years ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
default
Children:
105:7b42093e7c2b, 111:9fa05a16eed9
Phase:
public
Message:

Introduced constants for default flags of input and output data ports

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • definitions.h

    r54 r104  
    3838//---------------------------------------------------------------------- 
    3939#include "rrlib/time/time.h" 
     40#include "core/tFrameworkElement.h" 
    4041 
    4142//---------------------------------------------------------------------- 
     
    7576 
    7677/*! Timeout for pull operations */ 
    77 static constexpr rrlib::time::tDuration cPULL_TIMEOUT = std::chrono::seconds(1); 
     78constexpr rrlib::time::tDuration cPULL_TIMEOUT = std::chrono::seconds(1); 
     79 
     80/*! Default flags for input and output data ports */ 
     81constexpr core::tFrameworkElement::tFlags cDEFAULT_INPUT_PORT_FLAGS = core::tFrameworkElement::tFlag::ACCEPTS_DATA | core::tFrameworkElement::tFlag::PUSH_STRATEGY; 
     82constexpr core::tFrameworkElement::tFlags cDEFAULT_OUTPUT_PORT_FLAGS = core::tFrameworkElement::tFlag::EMITS_DATA | core::tFrameworkElement::tFlag::OUTPUT_PORT; 
    7883 
    7984//---------------------------------------------------------------------- 
  • tInputPort.h

    r101 r104  
    111111  template <typename TArg1, typename TArg2, typename ... TRest> 
    112112  tInputPort(const TArg1& arg1, const TArg2& arg2, const TRest&... args) : 
    113     tPort<T>(arg1, arg2, args..., core::tFrameworkElement::tFlag::ACCEPTS_DATA | core::tFrameworkElement::tFlag::PUSH_STRATEGY) 
     113    tPort<T>(arg1, arg2, args..., cDEFAULT_INPUT_PORT_FLAGS) 
    114114  {} 
    115115 
     
    117117  template < typename TArgument1, bool ENABLE = !std::is_base_of<tInputPort, TArgument1>::value > 
    118118  tInputPort(const TArgument1& argument1, typename std::enable_if<ENABLE, tNoArgument>::type no_argument = tNoArgument()) : 
    119     tPort<T>(argument1, core::tFrameworkElement::tFlag::ACCEPTS_DATA | core::tFrameworkElement::tFlag::PUSH_STRATEGY) 
     119    tPort<T>(argument1, cDEFAULT_INPUT_PORT_FLAGS) 
    120120  {} 
    121121 
  • tOutputPort.h

    r101 r104  
    104104  template <typename TArg1, typename TArg2, typename ... TRest> 
    105105  tOutputPort(const TArg1& arg1, const TArg2& arg2, const TRest&... args) : 
    106     tPort<T>(arg1, arg2, args..., core::tFrameworkElement::tFlag::EMITS_DATA | core::tFrameworkElement::tFlag::OUTPUT_PORT) 
     106    tPort<T>(arg1, arg2, args..., cDEFAULT_OUTPUT_PORT_FLAGS) 
    107107  {} 
    108108 
     
    110110  template < typename TArgument1, bool ENABLE = !std::is_base_of<tOutputPort, TArgument1>::value > 
    111111  tOutputPort(const TArgument1& argument1, typename std::enable_if<ENABLE, tNoArgument>::type no_argument = tNoArgument()) : 
    112     tPort<T>(argument1, core::tFrameworkElement::tFlag::EMITS_DATA | core::tFrameworkElement::tFlag::OUTPUT_PORT) 
     112    tPort<T>(argument1, cDEFAULT_OUTPUT_PORT_FLAGS) 
    113113  {} 
    114114 
Note: See TracChangeset for help on using the changeset viewer.