ocltoolkit.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 
00007 // This library is free software; you can redistribute it and/or
00008 // modify it under the terms of the GNU Lesser General Public
00009 // License as published by the Free Software Foundation; either
00010 // version 2.1 of the License, or (at your option) any later version.
00011 
00012 // This library is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 // Lesser General Public License for more details.
00016 
00017 // You should have received a copy of the GNU Lesser General Public
00018 // License along with this library; if not, write to the Free Software
00019 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00020 
00021 #include <rtt/types/TypekitPlugin.hpp>
00022 #include <rtt/types/SequenceTypeInfo.hpp>
00023 
00024 #include <string>
00025 #include <vector>
00026 
00027 namespace OCL
00028 {
00029     using namespace RTT;
00030     using namespace RTT::detail;
00031     using namespace std;
00032 
00033     class OCLTypekit : public TypekitPlugin
00034     {
00035     public:
00036         bool loadTypes() {
00037             RTT::types::TypeInfoRepository::Instance()->addType( new types::SequenceTypeInfo<vector<std::string> >("strings") );
00038 
00039             // segfaults when reading out an element of this type:
00040             //RTT::types::TypeInfoRepository::Instance()->addType( new types::SequenceTypeInfo<vector<bool> >("bools") );
00041 
00042             RTT::types::TypeInfoRepository::Instance()->addType( new types::SequenceTypeInfo<vector<double> >("doubles") );
00043 
00044             RTT::types::TypeInfoRepository::Instance()->addType( new types::SequenceTypeInfo<vector<int> >("ints") );
00045 
00046             return true;
00047         }
00048 
00049         bool loadOperators() { return true; }
00050         bool loadConstructors() { return true; }
00051 
00052         std::string getName() {
00053              return "OCLTypekit";
00054         }
00055     };
00056 }
00057 
00058 ORO_TYPEKIT_PLUGIN( OCL::OCLTypekit )
00059 


ocl
Author(s): OCL Development Team
autogenerated on Mon Oct 6 2014 03:16:37