vgl_xio_point_2d.hxx
Go to the documentation of this file.
1 // This is core/vgl/xio/vgl_xio_point_2d.hxx
2 #ifndef vgl_xio_point_2d_hxx_
3 #define vgl_xio_point_2d_hxx_
4 //:
5 // \file
6 
7 #include "vgl_xio_point_2d.h"
8 #include <vsl/vsl_basic_xml_element.h>
9 
10 //============================================================================
11 //: Binary save self to stream.
12 template<class T>
13 void x_write(std::ostream &os, const vgl_point_2d<T> & v, std::string name)
14 {
15  vsl_basic_xml_element element(name);
16  element.add_attribute("x", v.x());
17  element.add_attribute("y", v.y());
18  element.x_write(os);
19 }
20 
21 #define VGL_XIO_POINT_2D_INSTANTIATE(T) \
22 template void x_write(std::ostream &, const vgl_point_2d<T > &, std::string)
23 
24 #endif // vgl_xio_point_2d_hxx_
#define v
Definition: vgl_vector_2d.h:74
void x_write(std::ostream &os, const vgl_point_2d< T > &v, std::string name)
Binary save self to stream.