Changeset 128:7f6da0bda8b6 in finroc_plugins_data_ports


Ignore:
Timestamp:
22.09.2017 01:47:49 (22 months ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
17.03
Phase:
public
Message:

Adds generic type conversion operations for events

Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • make.xml

    r107 r128  
    88      tBounds.h 
    99      tChangeContext.h 
    10       tEvent.h 
     10      tEvent.cpp 
    1111      tQueueSettings.h 
    1212      type_traits.h 
  • tEvent.h

    r87 r128  
    4545// External includes (system with <>, local with "") 
    4646//---------------------------------------------------------------------- 
     47#include "rrlib/serialization/serialization.h" 
     48#include "rrlib/rtti_conversion/tRegisteredConversionOperation.h" 
    4749 
    4850//---------------------------------------------------------------------- 
     
    9193}; 
    9294 
    93 inline rrlib::serialization::tOutputStream& operator << (rrlib::serialization::tOutputStream& stream, const tEvent& number) 
     95inline rrlib::serialization::tOutputStream& operator << (rrlib::serialization::tOutputStream& stream, const tEvent& event) 
    9496{ 
    9597  return stream; 
    9698} 
    9799 
    98 inline rrlib::serialization::tInputStream& operator >> (rrlib::serialization::tInputStream& stream, tEvent& number) 
     100inline rrlib::serialization::tInputStream& operator >> (rrlib::serialization::tInputStream& stream, tEvent& event) 
    99101{ 
    100102  return stream; 
    101103} 
     104 
     105extern const rrlib::rtti::conversion::tRegisteredConversionOperation& cANY_TO_EVENT_OPERATION;         //!< Converts any data to an (empty) event 
     106extern const rrlib::rtti::conversion::tRegisteredConversionOperation& cEVENT_TO_DEFAULT_OPERATION;     //!< Converts any event to data type default 
    102107 
    103108//---------------------------------------------------------------------- 
  • tPort.cpp

    r46 r128  
    3737// Internal includes with "" 
    3838//---------------------------------------------------------------------- 
    39 #include "plugins/data_ports/tEvent.h" 
    4039 
    4140//---------------------------------------------------------------------- 
     
    6463//---------------------------------------------------------------------- 
    6564 
    66 /*! Initializes tEvent data type */ 
    67 static rrlib::rtti::tDataType<tEvent> cINIT_EVENT_DATA_TYPE("Event"); 
    68  
    6965//---------------------------------------------------------------------- 
    7066// Implementation 
Note: See TracChangeset for help on using the changeset viewer.