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