X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=PPI%2FConnectors.hh;h=60b1f719d8ba476b4a5ada017886a8970153cc38;hb=d8c2d9d478b8808e5b76e4688aea4f840b6a1df7;hp=be55849db43207ae9ee86a73b5f43eaaa4acc6f6;hpb=17d44437f7fb8ee68a96ed55fc327c746c161142;p=senf.git diff --git a/PPI/Connectors.hh b/PPI/Connectors.hh index be55849..60b1f71 100644 --- a/PPI/Connectors.hh +++ b/PPI/Connectors.hh @@ -123,7 +123,7 @@ namespace connector { void connect(Connector & target); private: - virtual std::type_info const & packetTypeID() = 0; + virtual std::type_info const & packetTypeID(); void setModule(module::Module & module); @@ -456,27 +456,24 @@ namespace connector { # define TypedConnector_Input read # define TypedConnector_Output write -# define TypedConnector(pType, dir) \ +# define TypedConnector(pType, dir) \ template \ - class pType ## dir \ - : public Generic ## pType ## dir, \ - private detail::Typed ## dir ## Mixin, PacketType> \ + class pType ## dir \ + : public Generic ## pType ## dir, \ + private detail::Typed ## dir ## Mixin, PacketType> \ { \ - typedef detail::Typed ## dir ## Mixin, PacketType> mixin; \ + typedef detail::Typed ## dir ## Mixin, PacketType> mixin; \ public: \ using mixin::operator(); \ using mixin::TypedConnector_ ## dir ; \ private: \ virtual std::type_info const & packetTypeID() \ { return typeid(typename PacketType::type); } \ - friend class detail::Typed ## dir ## Mixin, PacketType>; \ + friend class detail::Typed ## dir ## Mixin, PacketType>; \ }; \ template <> \ - class pType ## dir : public Generic ## pType ## dir \ - { \ - private: \ - virtual std::type_info const & packetTypeID() { return typeid(void); } \ - } + class pType ## dir : public Generic ## pType ## dir \ + {} TypedConnector( Passive, Input ); TypedConnector( Passive, Output );