TransportPlugin.cpp
Go to the documentation of this file.
00001 /* Generated from orogen/lib/orogen/templates/typekit/corba/TransportPlugin.cpp */
00002 
00003 // First load all RTT interfaces so that we get all "extern template"
00004 // declarations in the TypekitImpl files
00005 #include "transports/corba/Registration.hpp"
00006 #include "transports/corba/TransportPlugin.hpp"
00007 #include <rtt/transports/corba/CorbaLib.hpp>
00008 #include <rtt/types/TypekitPlugin.hpp>
00009 using namespace RTT;
00010 
00011 bool orogen_typekits::<%= typekit.name %>CorbaTransportPlugin::registerTransport(std::string type_name, RTT::types::TypeInfo* ti)
00012 {
00013     if(ti->hasProtocol(ORO_CORBA_PROTOCOL_ID))
00014         return false;
00015 
00016     <% first_type = true;
00017        typesets.interface_types.each do |type|
00018            names = [type.name]
00019            if aliases = typesets.aliases[type]
00020                names.concat(aliases)
00021            end
00022            if_cond = names.map { |n| "\"#{n}\" == type_name" }.join(" || ")
00023         %>
00024     <%= 'else ' unless first_type %>if (<%= if_cond %>)
00025     {
00026         return ti->addProtocol(ORO_CORBA_PROTOCOL_ID,
00027             <%= type.method_name %>_CorbaTransport());
00028     }
00029     <% first_type = false
00030     end %>
00031     return false;
00032 }
00033 std::string orogen_typekits::<%= typekit.name %>CorbaTransportPlugin::getTransportName() const
00034 { return "CORBA"; }
00035 std::string orogen_typekits::<%= typekit.name %>CorbaTransportPlugin::getTypekitName() const
00036 { return "/orogen/<%= typekit.name %>"; }
00037 std::string orogen_typekits::<%= typekit.name %>CorbaTransportPlugin::getName() const
00038 { return "/orogen/<%= typekit.name %>/CORBA"; }
00039 
00040 ORO_TYPEKIT_PLUGIN(orogen_typekits::<%= typekit.name %>CorbaTransportPlugin);
00041 


orogen
Author(s): Sylvain Joyeux/sylvain.joyeux@m4x.org
autogenerated on Sat Jun 8 2019 19:52:17