Changeset 118:8687401dd38e in finroc_plugins_data_ports


Ignore:
Timestamp:
09.08.2017 19:15:11 (2 years ago)
Author:
Max Reichardt <max.reichardt@…>
Branch:
17.03
Phase:
public
Message:

Adds set method for DEFAULT_ON_DISCONNECT flag

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • common/tAbstractDataPort.h

    r114 r118  
    173173  { 
    174174    custom_changed_flag = new_value; 
     175  } 
     176 
     177  /*! 
     178   * \param value Whether DEFAULT_ON_DISCONNECT flag should be set 
     179   */ 
     180  void SetDefaultOnDisconnect(bool value) 
     181  { 
     182    SetFlag(tFlag::DEFAULT_ON_DISCONNECT, value); 
    175183  } 
    176184 
  • optimized/tCheapCopyPort.cpp

    r115 r118  
    7878static rrlib::rtti::tGenericObject* CreateDefaultValue(const common::tAbstractDataPortCreationInfo& creation_info) 
    7979{ 
    80   if (creation_info.DefaultValueSet() || creation_info.flags.Get(core::tFrameworkElement::tFlag::DEFAULT_ON_DISCONNECT)) 
     80  if (creation_info.DefaultValueSet() || creation_info.flags.Get(core::tFrameworkElement::tFlag::DEFAULT_ON_DISCONNECT) || creation_info.flags.Get(core::tFrameworkElement::tFlag::VOLATILE) || creation_info.flags.Get(core::tFrameworkElement::tFlag::NETWORK_ELEMENT)) 
    8181  { 
    8282    rrlib::rtti::tGenericObject* result = creation_info.data_type.CreateGenericObject(); 
  • standard/tStandardPort.cpp

    r115 r118  
    218218tPortBufferManager* tStandardPort::CreateDefaultValue(const common::tAbstractDataPortCreationInfo& creation_info, tBufferPool& buffer_pool) 
    219219{ 
    220   if (creation_info.DefaultValueSet() || creation_info.flags.Get(tFlag::DEFAULT_ON_DISCONNECT)) 
     220  if (creation_info.DefaultValueSet() || creation_info.flags.Get(tFlag::DEFAULT_ON_DISCONNECT) || creation_info.flags.Get(tFlag::VOLATILE) || creation_info.flags.Get(tFlag::NETWORK_ELEMENT)) 
    221221  { 
    222222    tPortBufferManager* pdm = buffer_pool.GetUnusedBuffer(creation_info.data_type).release(); 
Note: See TracChangeset for help on using the changeset viewer.