00001
00002
00003
00004
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 <% first_type = true;
00014 typesets.interface_types.each do |type|
00015 names = [type.name]
00016 if aliases = typesets.aliases[type]
00017 names.concat(aliases)
00018 end
00019 if_cond = names.map { |n| "\"#{n}\" == type_name" }.join(" || ")
00020 %>
00021 <%= 'else ' unless first_type %>if (<%= if_cond %>)
00022 {
00023 ti->addProtocol(ORO_CORBA_PROTOCOL_ID,
00024 <%= type.method_name %>_CorbaTransport());
00025 return true;
00026 }
00027 <% first_type = false
00028 end %>
00029 return false;
00030 }
00031 std::string orogen_typekits::<%= typekit.name %>CorbaTransportPlugin::getTransportName() const
00032 { return "CORBA"; }
00033 std::string orogen_typekits::<%= typekit.name %>CorbaTransportPlugin::getTypekitName() const
00034 { return "/orogen/<%= typekit.name %>"; }
00035 std::string orogen_typekits::<%= typekit.name %>CorbaTransportPlugin::getName() const
00036 { return "/orogen/<%= typekit.name %>/CORBA"; }
00037
00038 ORO_TYPEKIT_PLUGIN(orogen_typekits::<%= typekit.name %>CorbaTransportPlugin);
00039