Changeset 59:011ac388fd3c in finroc_plugins_data_ports


Ignore:
Timestamp:
25.02.2014 15:44:33 (5 years ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
default
Phase:
public
Message:

Added 'override' keyword where appropriate

Files:
11 edited

Legend:

Unmodified
Added
Removed
  • api/tBoundedPort.h

    r47 r59  
    140140 
    141141  virtual std::string BrowserPublishRaw(tUnusedManagerPointer& buffer, bool notify_listener_on_this_port = true, 
    142                                         tChangeStatus change_constant = tChangeStatus::CHANGED) // FIXME: explicitly override when we use gcc 4.7 
     142                                        tChangeStatus change_constant = tChangeStatus::CHANGED) override 
    143143  { 
    144144    if (buffer->GetObject().GetType() != GetDataType()) 
     
    174174  } 
    175175 
    176   virtual bool NonStandardAssign(tPublishingDataGlobalBuffer& publishing_data, tChangeStatus change_constant) // FIXME: explicitly override when we use gcc 4.7 
     176  virtual bool NonStandardAssign(tPublishingDataGlobalBuffer& publishing_data, tChangeStatus change_constant) override 
    177177  { 
    178178    return NonStandardAssignImplementation(publishing_data, change_constant); 
    179179  } 
    180180 
    181   virtual bool NonStandardAssign(tPublishingDataThreadLocalBuffer& publishing_data, tChangeStatus change_constant) // FIXME: explicitly override when we use gcc 4.7 
     181  virtual bool NonStandardAssign(tPublishingDataThreadLocalBuffer& publishing_data, tChangeStatus change_constant) override 
    182182  { 
    183183    return NonStandardAssignImplementation(publishing_data, change_constant); 
  • api/tGenericPortImplementation.cpp

    r46 r59  
    110110  typedef optimized::tCheapCopyPort tPortBase; 
    111111 
    112   virtual core::tAbstractPort* CreatePort(const common::tAbstractDataPortCreationInfo& creation_info) 
     112  virtual core::tAbstractPort* CreatePort(const common::tAbstractDataPortCreationInfo& creation_info) override 
    113113  { 
    114114    tPort<T> port(creation_info); 
     
    116116  } 
    117117 
    118   virtual void Get(core::tAbstractPort& port, rrlib::rtti::tGenericObject& result, rrlib::time::tTimestamp& timestamp) 
     118  virtual void Get(core::tAbstractPort& port, rrlib::rtti::tGenericObject& result, rrlib::time::tTimestamp& timestamp) override 
    119119  { 
    120120    tImplementation::CopyCurrentPortValue(static_cast<tPortBase&>(port), result.GetData<T>(), timestamp); 
    121121  } 
    122122 
    123   virtual tPortDataPointer<const rrlib::rtti::tGenericObject> GetPointer(core::tAbstractPort& abstract_port, tStrategy strategy) 
     123  virtual tPortDataPointer<const rrlib::rtti::tGenericObject> GetPointer(core::tAbstractPort& abstract_port, tStrategy strategy) override 
    124124  { 
    125125    tPortBase& port = static_cast<tPortBase&>(abstract_port); 
     
    139139  } 
    140140 
    141   virtual void Publish(core::tAbstractPort& port, const rrlib::rtti::tGenericObject& data, const rrlib::time::tTimestamp& timestamp) 
     141  virtual void Publish(core::tAbstractPort& port, const rrlib::rtti::tGenericObject& data, const rrlib::time::tTimestamp& timestamp) override 
    142142  { 
    143143    tImplementation::CopyAndPublish(static_cast<tPortBase&>(port), data.GetData<T>(), timestamp); 
    144144  } 
    145145 
    146   virtual void SetBounds(core::tAbstractPort& port, const rrlib::rtti::tGenericObject& min, const rrlib::rtti::tGenericObject& max) 
     146  virtual void SetBounds(core::tAbstractPort& port, const rrlib::rtti::tGenericObject& min, const rrlib::rtti::tGenericObject& max) override 
    147147  { 
    148148    std::conditional<cBOUNDABLE, tBoundsSetter<T>, tNoBoundsSetter>::type::SetBounds(port, min, max); 
     
    157157  typedef optimized::tCheapCopyPort tPortBase; 
    158158 
    159   virtual core::tAbstractPort* CreatePort(const common::tAbstractDataPortCreationInfo& creation_info) 
     159  virtual core::tAbstractPort* CreatePort(const common::tAbstractDataPortCreationInfo& creation_info) override 
    160160  { 
    161161    return new tPortBase(creation_info); 
    162162  } 
    163163 
    164   virtual void Get(core::tAbstractPort& port, rrlib::rtti::tGenericObject& result, rrlib::time::tTimestamp& timestamp) 
     164  virtual void Get(core::tAbstractPort& port, rrlib::rtti::tGenericObject& result, rrlib::time::tTimestamp& timestamp) override 
    165165  { 
    166166    static_cast<tPortBase&>(port).CopyCurrentValueToGenericObject(result, timestamp); 
    167167  } 
    168168 
    169   virtual tPortDataPointer<const rrlib::rtti::tGenericObject> GetPointer(core::tAbstractPort& abstract_port, tStrategy strategy) 
     169  virtual tPortDataPointer<const rrlib::rtti::tGenericObject> GetPointer(core::tAbstractPort& abstract_port, tStrategy strategy) override 
    170170  { 
    171171    tPortBase& port = static_cast<tPortBase&>(abstract_port); 
     
    185185  } 
    186186 
    187   virtual void Publish(core::tAbstractPort& port, const rrlib::rtti::tGenericObject& data, const rrlib::time::tTimestamp& timestamp) 
     187  virtual void Publish(core::tAbstractPort& port, const rrlib::rtti::tGenericObject& data, const rrlib::time::tTimestamp& timestamp) override 
    188188  { 
    189189    assert(data.GetType() == port.GetDataType()); 
     
    207207  } 
    208208 
    209   virtual void SetBounds(core::tAbstractPort& port, const rrlib::rtti::tGenericObject& min, const rrlib::rtti::tGenericObject& max) 
     209  virtual void SetBounds(core::tAbstractPort& port, const rrlib::rtti::tGenericObject& min, const rrlib::rtti::tGenericObject& max) override 
    210210  { 
    211211    FINROC_LOG_PRINT(ERROR, "Cannot set bounds for type ", port.GetDataType().GetName()); 
     
    219219  typedef standard::tStandardPort tPortBase; 
    220220 
    221   virtual core::tAbstractPort* CreatePort(const common::tAbstractDataPortCreationInfo& creation_info) 
     221  virtual core::tAbstractPort* CreatePort(const common::tAbstractDataPortCreationInfo& creation_info) override 
    222222  { 
    223223    return new tPortBase(creation_info); 
    224224  } 
    225225 
    226   virtual void Get(core::tAbstractPort& port, rrlib::rtti::tGenericObject& result, rrlib::time::tTimestamp& timestamp) 
     226  virtual void Get(core::tAbstractPort& port, rrlib::rtti::tGenericObject& result, rrlib::time::tTimestamp& timestamp) override 
    227227  { 
    228228    typename tPortBase::tLockingManagerPointer mgr = static_cast<tPortBase&>(port).GetCurrentValueRaw(); 
     
    231231  } 
    232232 
    233   virtual tPortDataPointer<const rrlib::rtti::tGenericObject> GetPointer(core::tAbstractPort& port, tStrategy strategy) 
     233  virtual tPortDataPointer<const rrlib::rtti::tGenericObject> GetPointer(core::tAbstractPort& port, tStrategy strategy) override 
    234234  { 
    235235    typename tPortBase::tLockingManagerPointer mgr = static_cast<tPortBase&>(port).GetCurrentValueRaw(strategy); 
     
    237237  } 
    238238 
    239   virtual void Publish(core::tAbstractPort& port, const rrlib::rtti::tGenericObject& data, const rrlib::time::tTimestamp& timestamp) 
     239  virtual void Publish(core::tAbstractPort& port, const rrlib::rtti::tGenericObject& data, const rrlib::time::tTimestamp& timestamp) override 
    240240  { 
    241241    assert(data.GetType() == port.GetDataType()); 
     
    246246  } 
    247247 
    248   virtual void SetBounds(core::tAbstractPort& port, const rrlib::rtti::tGenericObject& min, const rrlib::rtti::tGenericObject& max) 
     248  virtual void SetBounds(core::tAbstractPort& port, const rrlib::rtti::tGenericObject& min, const rrlib::rtti::tGenericObject& max) override 
    249249  { 
    250250    FINROC_LOG_PRINT(ERROR, "Cannot set bounds for type ", port.GetDataType().GetName()); 
  • api/tPortListenerAdapter.h

    r46 r59  
    8484  {} 
    8585 
    86   virtual void PortDeleted() 
     86  virtual void PortDeleted() override 
    8787  { 
    8888    delete this; 
     
    109109  } 
    110110 
    111   virtual void PortDeleted() 
     111  virtual void PortDeleted() override 
    112112  { 
    113113    previous_listener.PortDeleted(); 
     
    133133  typedef tPortImplementation<T, TPortImplementationType> tImplementation; 
    134134 
    135   virtual void PortChangedRaw(tChangeContext& change_context, int& lock_counter, rrlib::buffer_pools::tBufferManagementInfo& value) 
     135  virtual void PortChangedRaw(tChangeContext& change_context, int& lock_counter, rrlib::buffer_pools::tBufferManagementInfo& value) override 
    136136  { 
    137137    this->PortChangedRawBase(change_context, lock_counter, value); 
     
    154154private: 
    155155 
    156   virtual void PortChangedRaw(tChangeContext& change_context, int& lock_counter, rrlib::buffer_pools::tBufferManagementInfo& value) 
     156  virtual void PortChangedRaw(tChangeContext& change_context, int& lock_counter, rrlib::buffer_pools::tBufferManagementInfo& value) override 
    157157  { 
    158158    this->PortChangedRawBase(change_context, lock_counter, value); 
     
    172172private: 
    173173 
    174   virtual void PortChangedRaw(tChangeContext& change_context, int& lock_counter, rrlib::buffer_pools::tBufferManagementInfo& value) 
     174  virtual void PortChangedRaw(tChangeContext& change_context, int& lock_counter, rrlib::buffer_pools::tBufferManagementInfo& value) override 
    175175  { 
    176176    this->PortChangedRawBase(change_context, lock_counter, value); 
     
    200200  typedef tPortImplementation<T, tPortImplementationTypeTrait<T>::type> tImplementation; 
    201201 
    202   virtual void PortChangedRaw(tChangeContext& change_context, int& lock_counter, rrlib::buffer_pools::tBufferManagementInfo& value) 
     202  virtual void PortChangedRaw(tChangeContext& change_context, int& lock_counter, rrlib::buffer_pools::tBufferManagementInfo& value) override 
    203203  { 
    204204    this->PortChangedRawBase(change_context, lock_counter, value); 
     
    235235private: 
    236236 
    237   virtual void PortChangedRaw(tChangeContext& change_context, int& lock_counter, rrlib::buffer_pools::tBufferManagementInfo& value) 
     237  virtual void PortChangedRaw(tChangeContext& change_context, int& lock_counter, rrlib::buffer_pools::tBufferManagementInfo& value) override 
    238238  { 
    239239    this->PortChangedRawBase(change_context, lock_counter, value); 
     
    265265private: 
    266266 
    267   virtual void PortChangedRaw(tChangeContext& change_context, int& lock_counter, rrlib::buffer_pools::tBufferManagementInfo& value) 
     267  virtual void PortChangedRaw(tChangeContext& change_context, int& lock_counter, rrlib::buffer_pools::tBufferManagementInfo& value) override 
    268268  { 
    269269    this->PortChangedRawBase(change_context, lock_counter, value); 
  • api/tPullRequestHandlerAdapter.h

    r46 r59  
    8383  virtual tPortDataPointer<const T> OnPullRequest(tOutputPort<T>& origin) = 0; 
    8484 
    85   virtual bool RawPullRequest(optimized::tCheapCopyPort& origin, optimized::tCheaplyCopiedBufferManager& result_buffer) 
     85  virtual bool RawPullRequest(optimized::tCheapCopyPort& origin, optimized::tCheaplyCopiedBufferManager& result_buffer) override 
    8686  { 
    8787    tOutputPort<T> origin_port = tOutputPort<T>::Wrap(origin); 
     
    101101  virtual tPortDataPointer<const T> OnPullRequest(tOutputPort<T>& origin) = 0; 
    102102 
    103   virtual typename standard::tStandardPort::tUniversalManagerPointer RawPullRequest(standard::tStandardPort& origin) 
     103  virtual typename standard::tStandardPort::tUniversalManagerPointer RawPullRequest(standard::tStandardPort& origin) override 
    104104  { 
    105105    tOutputPort<T> origin_port = tOutputPort<T>::Wrap(origin); 
     
    124124  virtual tPortDataPointer<const rrlib::rtti::tGenericObject> OnPullRequest(tGenericPort& origin) = 0; 
    125125 
    126   virtual typename standard::tStandardPort::tUniversalManagerPointer RawPullRequest(standard::tStandardPort& origin) 
     126  virtual typename standard::tStandardPort::tUniversalManagerPointer RawPullRequest(standard::tStandardPort& origin) override 
    127127  { 
    128128    tGenericPort origin_port = tGenericPort::Wrap(origin); 
     
    132132  } 
    133133 
    134   virtual bool RawPullRequest(optimized::tCheapCopyPort& origin, optimized::tCheaplyCopiedBufferManager& result_buffer) 
     134  virtual bool RawPullRequest(optimized::tCheapCopyPort& origin, optimized::tCheaplyCopiedBufferManager& result_buffer) override 
    135135  { 
    136136    tGenericPort origin_port = tGenericPort::Wrap(origin); 
  • common/tAbstractDataPort.h

    r46 r59  
    337337  static core::tAbstractPortCreationInfo AdjustPortCreationInfo(const tAbstractDataPortCreationInfo& create_info); 
    338338 
    339   virtual void ConnectionAdded(tAbstractPort& partner, bool partner_is_destination); // FIXME: add "override" when we use gcc 4.7 
    340  
    341   virtual void ConnectionRemoved(tAbstractPort& partner, bool partner_is_destination); // FIXME: add "override" when we use gcc 4.7 
     339  virtual void ConnectionAdded(tAbstractPort& partner, bool partner_is_destination) override; 
     340 
     341  virtual void ConnectionRemoved(tAbstractPort& partner, bool partner_is_destination) override; 
    342342 
    343343  /*! 
  • optimized/tCheapCopyPort.h

    r46 r59  
    304304  } 
    305305 
    306   virtual void ForwardData(tAbstractDataPort& other); 
     306  virtual void ForwardData(tAbstractDataPort& other) override; 
    307307 
    308308  /*! 
     
    384384  } 
    385385 
    386   virtual void NotifyDisconnect(); 
     386  virtual void NotifyDisconnect(); // TODO: why is this virtual? 
    387387 
    388388//  /*! 
     
    814814//  } 
    815815 
    816   virtual int GetMaxQueueLengthImplementation() const; 
     816  virtual int GetMaxQueueLengthImplementation() const override; 
    817817 
    818818//  /*! 
     
    827827//  } 
    828828 
    829   virtual void InitialPushTo(tAbstractPort& target, bool reverse); 
     829  virtual void InitialPushTo(tAbstractPort& target, bool reverse) override; 
    830830 
    831831  /*! 
  • optimized/tCheaplyCopiedBufferManager.h

    r46 r59  
    135135  tThreadLocalBufferPools* const origin; 
    136136 
    137   virtual rrlib::rtti::tGenericObject& GetObjectImplementation(); 
     137  virtual rrlib::rtti::tGenericObject& GetObjectImplementation() override; 
    138138}; 
    139139 
  • standard/tPortBufferManager.h

    r46 r59  
    137137  tPortBufferManager(); 
    138138 
    139   virtual rrlib::rtti::tGenericObject& GetObjectImplementation(); 
     139  virtual rrlib::rtti::tGenericObject& GetObjectImplementation() override; 
    140140}; 
    141141 
  • standard/tStandardPort.cpp

    r46 r59  
    8080{ 
    8181  virtual core::tAbstractPort& CreatePortImplementation(const std::string& port_name, core::tFrameworkElement& parent, 
    82       const rrlib::rtti::tType& type, core::tFrameworkElement::tFlags flags) 
     82      const rrlib::rtti::tType& type, core::tFrameworkElement::tFlags flags) override 
    8383  { 
    8484    core::tPortWrapperBase::tConstructorArguments<common::tAbstractDataPortCreationInfo> creation_info(port_name, &parent, type, flags); 
     
    8989  } 
    9090 
    91   virtual bool HandlesDataType(const rrlib::rtti::tType& dt) 
     91  virtual bool HandlesDataType(const rrlib::rtti::tType& dt) override 
    9292  { 
    9393    return IsDataFlowType(dt); 
  • standard/tStandardPort.h

    r46 r59  
    205205  } 
    206206 
    207   virtual void ForwardData(tAbstractDataPort& other); // TODO either add to AbstractDataPort or remove virtuality and add comment 
     207  virtual void ForwardData(tAbstractDataPort& other) override; 
    208208 
    209209  /*! 
     
    253253  virtual tUnusedManagerPointer GetUnusedBufferRaw(const rrlib::rtti::tType& dt); 
    254254 
    255   virtual void NotifyDisconnect(); 
     255  virtual void NotifyDisconnect(); // TODO: why is this virtual? 
    256256 
    257257  /*! 
     
    483483  static tPortBufferManager* CreateDefaultValue(const common::tAbstractDataPortCreationInfo& creation_info, tBufferPool& buffer_pool); 
    484484 
    485   virtual int GetMaxQueueLengthImplementation() const; 
     485  virtual int GetMaxQueueLengthImplementation() const override; 
    486486 
    487487  // quite similar to publish 
    488   virtual void InitialPushTo(tAbstractPort& target, bool reverse); 
     488  virtual void InitialPushTo(tAbstractPort& target, bool reverse) override; 
    489489 
    490490  /*! 
     
    529529  } 
    530530 
    531   virtual void PrintStructure(int indent, std::stringstream& output) const; // FIXME: add override with gcc 4.7 
     531  virtual void PrintStructure(int indent, std::stringstream& output) const override; 
    532532 
    533533  /*! 
  • test/basic_realtime.cpp

    r46 r59  
    8585  } 
    8686 
    87   virtual void MainLoopCallback() 
     87  virtual void MainLoopCallback() override 
    8888  { 
    8989    rrlib::time::tDuration diff = rrlib::time::Now() - tLoopThread::GetCurrentCycleStartTime(); 
Note: See TracChangeset for help on using the changeset viewer.