kinfam_io.hpp 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. // Copyright (C) 2007 Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
  2. // Version: 1.0
  3. // Author: Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
  4. // Maintainer: Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
  5. // URL: http://www.orocos.org/kdl
  6. // This library is free software; you can redistribute it and/or
  7. // modify it under the terms of the GNU Lesser General Public
  8. // License as published by the Free Software Foundation; either
  9. // version 2.1 of the License, or (at your option) any later version.
  10. // This library is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. // Lesser General Public License for more details.
  14. // You should have received a copy of the GNU Lesser General Public
  15. // License along with this library; if not, write to the Free Software
  16. // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  17. #ifndef KDL_KINFAM_IO_HPP
  18. #define KDL_KINFAM_IO_HPP
  19. #include <iostream>
  20. #include <fstream>
  21. #include "joint.hpp"
  22. #include "segment.hpp"
  23. #include "chain.hpp"
  24. #include "jntarray.hpp"
  25. #include "jacobian.hpp"
  26. #include "tree.hpp"
  27. namespace KDL {
  28. std::ostream& operator <<(std::ostream& os, const Joint& joint);
  29. std::istream& operator >>(std::istream& is, Joint& joint);
  30. std::ostream& operator <<(std::ostream& os, const Segment& segment);
  31. std::istream& operator >>(std::istream& is, Segment& segment);
  32. std::ostream& operator <<(std::ostream& os, const Chain& chain);
  33. std::istream& operator >>(std::istream& is, Chain& chain);
  34. std::ostream& operator <<(std::ostream& os, const Tree& tree);
  35. std::istream& operator >>(std::istream& is, Tree& tree);
  36. std::ostream& operator <<(std::ostream& os, SegmentMap::const_iterator it);
  37. std::ostream& operator <<(std::ostream& os, const JntArray& array);
  38. std::istream& operator >>(std::istream& is, JntArray& array);
  39. std::ostream& operator <<(std::ostream& os, const Jacobian& jac);
  40. std::istream& operator >>(std::istream& is, Jacobian& jac);
  41. template<typename T>
  42. std::ostream& operator<<(std::ostream& os, const std::vector<T>& vec) {
  43. os << "[";
  44. for (unsigned int i = 0; i < vec.size(); i++)
  45. os << vec[i] << " ";
  46. os << "]";
  47. return os;
  48. }
  49. ;
  50. template<typename T>
  51. std::istream& operator >>(std::istream& is, std::vector<T>& vec) {
  52. return is;
  53. }
  54. ;
  55. }
  56. #endif