Changeset 72:63e085350834 in finroc_plugins_data_ports


Ignore:
Timestamp:
03.07.2014 20:54:56 (5 years ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
default
Phase:
public
Message:

Made tPortCreationInfo::SetDefault() public

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tPortCreationInfo.h

    r63 r72  
    159159  } 
    160160 
     161  void SetDefault(const T& default_val, bool overwrite_default = false) 
     162  { 
     163    if (DefaultValueSet() && (!overwrite_default)) 
     164    { 
     165      FINROC_LOG_PRINT_STATIC(DEBUG_WARNING, "Default value already set"); 
     166    } 
     167    rrlib::serialization::tOutputStream os(default_value); 
     168    os << default_val; 
     169  } 
     170 
    161171//---------------------------------------------------------------------- 
    162172// Private fields and methods 
     
    187197    } 
    188198  } 
    189  
    190   void SetDefault(const T& default_val) 
    191   { 
    192     if (DefaultValueSet()) 
    193     { 
    194       FINROC_LOG_PRINT_STATIC(DEBUG_WARNING, "Default value already set"); 
    195     } 
    196     rrlib::serialization::tOutputStream os(default_value); 
    197     os << default_val; 
    198   } 
    199199}; 
    200200 
Note: See TracChangeset for help on using the changeset viewer.