vnl_xio_vector_fixed.h
Go to the documentation of this file.
1 // This is core/vnl/xio/vnl_xio_vector_fixed.h
2 #ifndef vnl_xio_vector_fixed_h
3 #define vnl_xio_vector_fixed_h
4 //:
5 // \file
6 // \brief XML write a vnl_vector_fixed
7 // Two functions which write a valid XML fragment to an ostream.
8 // The vector length is output as an attribute of the (top) node.
9 // - x_write() writes a single XML element node with text content only:
10 // space-separated coordinates.
11 // - x_write_tree() writes a 2-level XML fragment: one top element node,
12 // and one level below it for the individual vector elements
13 // (element nodes named "element" with a single value each).
14 // The name of the top node can be chosen; by default, it is "vnl_vector_fixed".
15 // \author Gamze Tunali
16 // \date Dec 28, 2005
17 // \verbatim
18 // Modifications
19 // 29 July 2011 - Peter Vanroose - added documentation, tests, and x_write_tree()
20 // \endverbatim
21 
22 #include <iosfwd>
23 #include <string>
24 #include <vsl/vsl_fwd.h>
25 #include <vnl/vnl_vector_fixed.h>
26 #ifdef _MSC_VER
27 # include <vcl_msvc_warnings.h>
28 #endif
29 
30 //: XML save vnl_vector_fixed to stream.
31 // \relatesalso vnl_vector_fixed
32 template <class T, unsigned n>
33 void x_write(std::ostream & os, vnl_vector_fixed<T,n> const& v,
34  std::string name="vnl_vector_fixed");
35 
36 //: XML save vnl_vector_fixed as a 2-level tree to stream.
37 // \relatesalso vnl_vector_fixed
38 template <class T, unsigned n>
39 void x_write_tree(std::ostream & os, vnl_vector_fixed<T,n> const& v,
40  std::string name="vnl_vector_fixed");
41 
42 #define VNL_XIO_VECTOR_FIXED_INSTANTIATE(T) extern "Please #include <vnl/xio/vnl_xio_vector_fixed.hxx> first"
43 
44 #endif // vnl_xio_vector_fixed_h
void VNL_EXPORT x_write_tree(std::ostream &os, vnl_matrix< T > const &v, std::string name="vnl_matrix")
XML save vnl_matrix as a 3-level tree to stream.
#define v
Definition: vnl_vector.h:42
Fixed length stack-stored, space-efficient vector.
Definition: vnl_fwd.h:22
Fixed length stack-stored vector.
void VNL_EXPORT x_write(std::ostream &os, vnl_matrix< T > const &v, std::string name="vnl_matrix")
XML save vnl_matrix to stream.