Changeset 153:c2d7f2e0d112 in finroc_plugins_data_ports


Ignore:
Timestamp:
26.03.2020 15:34:59 (12 months ago)
Author:
Max Reichardt <max.reichardt@…>
Branch:
17.03
Phase:
public
Message:

Fixes minor issues tGenericPort: if DELETED/DO_NOT_CREATE_NOW flag is set, constructor no longer complains on missing data type. Furthermore, a tContructorParameters typedef is added which is required for use with convenience ports.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tGenericPort.h

    r148 r153  
    8888public: 
    8989 
     90  /*! Bundles all possible constructor parameters of tPort */ 
     91  typedef common::tAbstractDataPortCreationInfo tConstructorParameters; 
     92 
    9093  /*! 
    9194   * Empty constructor in case port is created later 
     
    110113  { 
    111114    tConstructorArguments<common::tAbstractDataPortCreationInfo> creation_info(arg1, arg2, args...); 
    112     if ((creation_info.data_type.GetTypeTraits() & rrlib::rtti::trait_flags::cIS_BINARY_SERIALIZABLE) == 0) 
    113     { 
    114       throw std::runtime_error("Only binary serializable types may be used in data ports"); 
    115     } 
    116115    if (!creation_info.flags.Get(core::tFrameworkElementFlag::DELETED)) // do not create port, if deleted flag is set 
    117116    { 
     117      if ((creation_info.data_type.GetTypeTraits() & rrlib::rtti::trait_flags::cIS_BINARY_SERIALIZABLE) == 0) 
     118      { 
     119        throw std::runtime_error("Only binary serializable types may be used in data ports"); 
     120      } 
    118121      implementation = api::tGenericPortImplementation::GetImplementation(creation_info.data_type); 
    119122      SetWrapped(implementation->CreatePort(creation_info)); 
Note: See TracChangeset for help on using the changeset viewer.