vgl_xio_vector_3d.hxx
Go to the documentation of this file.
1 // This is core/vgl/xio/vgl_xio_vector_3d.hxx
2 #ifndef vgl_xio_vector_3d_hxx_
3 #define vgl_xio_vector_3d_hxx_
4 //:
5 // \file
6 
7 #include "vgl_xio_vector_3d.h"
8 #include <vgl/vgl_vector_3d.h>
9 #include <vsl/vsl_basic_xml_element.h>
10 
11 //============================================================================
12 //: XML save self to stream.
13 template<class T>
14 void x_write(std::ostream &os, const vgl_vector_3d<T> & v, std::string element_name)
15 {
16  vsl_basic_xml_element xml_element(element_name);
17  xml_element.add_attribute("x", v.x());
18  xml_element.add_attribute("y", v.y());
19  xml_element.add_attribute("z", v.z());
20  xml_element.x_write(os);
21 
22 }
23 
24 #define VGL_XIO_VECTOR_3D_INSTANTIATE(T) \
25 template void x_write(std::ostream &, const vgl_vector_3d<T > &, std::string)
26 
27 #endif // vgl_xio_vector_3d_hxx_
direction vector in Euclidean 3D space
#define v
Definition: vgl_vector_2d.h:74
void x_write(std::ostream &os, const vgl_vector_3d< T > &v, std::string element_name)
XML save self to stream.
Direction vector in Euclidean 3D space, templated by type of element.
Definition: vgl_fwd.h:13