vgl_xio_point_3d.hxx
Go to the documentation of this file.
1 // This is core/vgl/xio/vgl_xio_point_3d.hxx
2 #ifndef vgl_xio_point_3d_hxx_
3 #define vgl_xio_point_3d_hxx_
4 //:
5 // \file
6 
7 #include "vgl_xio_point_3d.h"
8 #include <vgl/vgl_point_3d.h>
9 #include <vsl/vsl_basic_xml_element.h>
10 
11 //============================================================================
12 //: XML write self to stream.
13 template<class T>
14 void x_write(std::ostream &os, const vgl_point_3d<T> & p, std::string element_name)
15 {
16  vsl_basic_xml_element xml_element(element_name);
17  xml_element.add_attribute("x", p.x());
18  xml_element.add_attribute("y", p.y());
19  xml_element.add_attribute("z", p.z());
20  xml_element.x_write(os);
21 }
22 
23 #define VGL_XIO_POINT_3D_INSTANTIATE(T) \
24 template void x_write(std::ostream &, const vgl_point_3d<T > &, std::string)
25 
26 #endif // vgl_xio_point_3d_hxx_
Type & z()
Definition: vgl_point_3d.h:73
a point in 3D nonhomogeneous space
Type & x()
Definition: vgl_point_3d.h:71
Type & y()
Definition: vgl_point_3d.h:72
void x_write(std::ostream &os, const vgl_point_3d< T > &p, std::string element_name)
XML write self to stream.