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                 if ( name == "KDL.Jacobian" )
00050                     return ti->addProtocol(ORO_CORBA_PROTOCOL_ID, new CorbaTemplateProtocol< KDL::Jacobian >() );
00051                 if ( name == "KDL.JntArray" )
00052                     return ti->addProtocol(ORO_CORBA_PROTOCOL_ID, new CorbaTemplateProtocol< KDL::JntArray >() );
00053                 return false;
00054             }
00055 
00056             std::string CorbaKDLPlugin::getTransportName() const {
00057                 return "CORBA";
00058             }
00059             std::string CorbaKDLPlugin::getTypekitName() const {
00060                 return "KDL";
00061             }
00062 
00063             std::string CorbaKDLPlugin::getName() const {
00064                 return "kdl-corba-types";
00065             }
00066     }
00067 }
00068 
00069 ORO_TYPEKIT_PLUGIN( KDL::Corba::CorbaKDLPlugin)
00070 


kdl_typekit
Author(s): Steven Bellens, Ruben Smits
autogenerated on Fri May 17 2019 02:37:38