corbatoolkit.cpp
Go to the documentation of this file.
00001 // Copyright  (C)  2008  Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
00002 
00003 // Version: 1.0
00004 // Author: Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
00005 // Maintainer: Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
00006 // URL: http://www.orocos.org/kdl
00007 
00008 // This library is free software; you can redistribute it and/or
00009 // modify it under the terms of the GNU Lesser General Public
00010 // License as published by the Free Software Foundation; either
00011 // version 2.1 of the License, or (at your option) any later version.
00012 
00013 // This library is distributed in the hope that it will be useful,
00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016 // Lesser General Public License for more details.
00017 
00018 // You should have received a copy of the GNU Lesser General Public
00019 // License along with this library; if not, write to the Free Software
00020 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00021 
00022 #include "corbatoolkit.hpp"
00023 #include <rtt/types/Types.hpp>
00024 #include <rtt/transports/corba/CorbaTemplateProtocol.hpp>
00025 #include "CorbaKDLConversion.hpp"
00026 #include <rtt/types/TypekitPlugin.hpp>
00027 
00028 using namespace RTT;
00029 using namespace RTT::types;
00030 using namespace RTT::corba;
00031 
00032 namespace KDL
00033 {
00034     namespace Corba
00035     {
00036 
00037             bool CorbaKDLPlugin::registerTransport(std::string name, TypeInfo* ti)
00038             {
00039                 if ( name == "KDL.Vector" )
00040                     return ti->addProtocol(ORO_CORBA_PROTOCOL_ID, new CorbaTemplateProtocol< KDL::Vector >() );
00041                 if ( name == "KDL.Rotation" )
00042                     return ti->addProtocol(ORO_CORBA_PROTOCOL_ID, new CorbaTemplateProtocol< KDL::Rotation >() );
00043                 if ( name == "KDL.Frame" )
00044                     return ti->addProtocol(ORO_CORBA_PROTOCOL_ID, new CorbaTemplateProtocol< KDL::Frame >() );
00045                 if ( name == "KDL.Wrench" )
00046                     return ti->addProtocol(ORO_CORBA_PROTOCOL_ID, new CorbaTemplateProtocol< KDL::Wrench >() );
00047                 if ( name == "KDL.Twist" )
00048                     return ti->addProtocol(ORO_CORBA_PROTOCOL_ID, new CorbaTemplateProtocol< KDL::Twist >() );
00049                 return false;
00050             }
00051 
00052             std::string CorbaKDLPlugin::getTransportName() const {
00053                 return "CORBA";
00054             }
00055             std::string CorbaKDLPlugin::getTypekitName() const {
00056                 return "KDL";
00057             }
00058 
00059             std::string CorbaKDLPlugin::getName() const {
00060                 return "kdl-corba-types";
00061             }
00062     }
00063 }
00064 
00065 ORO_TYPEKIT_PLUGIN( KDL::Corba::CorbaKDLPlugin)


kdl_typekit
Author(s): Steven Bellens, Ruben Smits
autogenerated on Thu Aug 27 2015 14:59:41