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