core/vnl/xio/vnl_xio_vector_fixed.h
Go to the documentation of this file.
00001 // This is core/vnl/xio/vnl_xio_vector_fixed.h
00002 #ifndef vnl_xio_vector_fixed_h
00003 #define vnl_xio_vector_fixed_h
00004 //:
00005 // \file
00006 // \brief XML write a vnl_vector_fixed
00007 //  Two functions which write a valid XML fragment to an ostream.
00008 //  The vector length is output as an attribute of the (top) node.
00009 // - x_write() writes a single XML element node with text content only:
00010 //             space-separated coordinates.
00011 // - x_write_tree() writes a 2-level XML fragment: one top element node,
00012 //                  and one level below it for the individual vector elements
00013 //                  (element nodes named "element" with a single value each).
00014 //  The name of the top node can be chosen; by default, it is "vnl_vector_fixed".
00015 // \author Gamze Tunali
00016 // \date  Dec 28, 2005
00017 // \verbatim
00018 //  Modifications
00019 //   29 July 2011 - Peter Vanroose - added documentation, tests, and x_write_tree()
00020 // \endverbatim
00021 
00022 #include <vsl/vsl_fwd.h>
00023 #include <vnl/vnl_vector_fixed.h>
00024 #include <vcl_iosfwd.h>
00025 #include <vcl_string.h>
00026 
00027 //: XML save vnl_vector_fixed to stream.
00028 // \relatesalso vnl_vector_fixed
00029 template <class T, unsigned n>
00030 void x_write(vcl_ostream & os, vnl_vector_fixed<T,n> const& v,
00031              vcl_string name="vnl_vector_fixed");
00032 
00033 //: XML save vnl_vector_fixed as a 2-level tree to stream.
00034 // \relatesalso vnl_vector_fixed
00035 template <class T, unsigned n>
00036 void x_write_tree(vcl_ostream & os, vnl_vector_fixed<T,n> const& v,
00037                   vcl_string name="vnl_vector_fixed");
00038 
00039 #define VNL_XIO_VECTOR_FIXED_INSTANTIATE(T) extern "Please #include <vnl/xio/vnl_xio_vector_fixed.txx> first"
00040 
00041 #endif // vnl_xio_vector_fixed_h