bfl_toolkit.hpp
Go to the documentation of this file.
00001 // Copyright  (C)  2009  Tinne De Laet <tinne dot delaet at mech dot kuleuven dot be>
00002 
00003 // Author: Tinne De Laet 
00004 // Maintainer: Tinne De Laet
00005 
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License, or (at your option) any later version.
00010 
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00019 
00020 #ifndef BFL_TOOLKIT_HPP
00021 #define BFL_TOOLKIT_HPP
00022 
00023 #include <rtt/ToolkitPlugin.hpp>
00024 
00025 //using namespace MatrixWrapper;
00026 namespace BFL{
00027 
00028 class bflToolkitPlugin: public RTT::ToolkitPlugin {
00029 public:
00030     virtual std::string getName();
00031 
00032     virtual bool loadTypes();
00033     virtual bool loadConstructors();
00034     virtual bool loadOperators();
00035 };
00036 
00037   extern bflToolkitPlugin bflToolkit;
00038 
00039     template<typename T>
00040     struct VectorAssignChecker
00041         : public std::binary_function<T, T, bool>
00042     {
00043         bool operator()(const T& v1, const T& v2) const
00044         {
00045             return v1.size()==v2.size();
00046         }
00047     };
00048 
00049     template<typename T>
00050     struct MatrixAssignChecker
00051         : public std::binary_function<T, T, bool>
00052     {
00053         bool operator()(const T& m1, const T& m2) const
00054         {
00055             return (m1.rows()==m2.rows())&&(m1.columns()==m2.columns());
00056         }
00057     };
00058 
00059     template<typename T>
00060     struct MatrixIndexChecker
00061         : public std::binary_function< T, unsigned int, bool>
00062     {
00063         bool operator()(const T& m, unsigned int i ) const
00064         {
00065             return (i > 0) && (i < m.rows());
00066         }
00067     };
00068 
00069 
00070 }
00071 #endif
00072 


bfl
Author(s): Klaas Gadeyne, Wim Meeussen, Tinne Delaet and many others. See web page for a full contributor list. ROS package maintained by Wim Meeussen.
autogenerated on Thu Feb 11 2016 22:31:56