00001
00002
00003
00004
00005 #include "Plugin.hpp"
00006
00007 #include <iostream>
00008 #include <boost/cstdint.hpp>
00009 #include <boost/lexical_cast.hpp>
00010
00011 #include <rtt/types/TypeInfoRepository.hpp>
00012 #include "type_info/Registration.hpp"
00013
00014 using namespace RTT;
00015
00016 orogen_typekits::<%= typekit.name %>TypekitPlugin::<%= typekit.name %>TypekitPlugin()
00017 {}
00018
00019 orogen_typekits::<%= typekit.name %>TypekitPlugin::~<%= typekit.name %>TypekitPlugin()
00020 {}
00021
00022
00023 #define TYPEKIT_PACKAGE_NAME_aux0(target) #target
00024 #define TYPEKIT_PACKAGE_NAME_aux(target) "<%= typekit.name %>-typekit-" TYPEKIT_PACKAGE_NAME_aux0(target)
00025 #define TYPEKIT_PACKAGE_NAME TYPEKIT_PACKAGE_NAME_aux(OROCOS_TARGET)
00026 bool orogen_typekits::<%= typekit.name %>TypekitPlugin::loadTypes()
00027 {
00028 RTT::types::TypeInfoRepository::shared_ptr ti_repository = RTT::types::TypeInfoRepository::Instance();
00029
00030 RTT::types::TypeInfo* ti = 0;
00031 <% registered_types.each do |type| %>
00032 <% if type < Typelib::ArrayType %>
00033 ti = <%= type.deference.method_name(true) %>_ArrayTypeInfo();
00034 ti_repository->addType( ti );
00035 <% else %>
00036 ti = <%= type.method_name(true) %>_TypeInfo();
00037 ti_repository->addType( ti );
00038 <% end %>
00039 <% end %>
00040
00041 return true;
00042 }
00043
00044 bool orogen_typekits::<%= typekit.name %>TypekitPlugin::loadOperators()
00045 { return true; }
00046 bool orogen_typekits::<%= typekit.name %>TypekitPlugin::loadConstructors()
00047 { return true; }
00048 std::string orogen_typekits::<%= typekit.name %>TypekitPlugin::getName()
00049 { return "/orogen/<%= typekit.name %>"; }
00050
00051 ORO_TYPEKIT_PLUGIN(orogen_typekits::<%= typekit.name %>TypekitPlugin);
00052