core/vgl/xio/vgl_xio_box_3d.txx
Go to the documentation of this file.
00001 // This is core/vgl/xio/vgl_xio_box_3d.txx
00002 #ifndef vgl_xio_box_3d_txx_
00003 #define vgl_xio_box_3d_txx_
00004 //:
00005 // \file
00006 
00007 #include "vgl_xio_box_3d.h"
00008 #include <vgl/vgl_box_3d.h>
00009 #include <vsl/vsl_basic_xml_element.h>
00010 
00011 //============================================================================
00012 //: Binary save self to stream.
00013 template<class T>
00014 void x_write(vcl_ostream &os, const vgl_box_3d<T> & p, vcl_string element_name)
00015 {  
00016     vsl_basic_xml_element xml_element(element_name);
00017     xml_element.add_attribute("min_x", p.min_x());
00018     xml_element.add_attribute("min_y", p.min_y());
00019     xml_element.add_attribute("min_z", p.min_z());
00020     xml_element.add_attribute("max_x", p.max_x());
00021     xml_element.add_attribute("max_y", p.max_y());
00022     xml_element.add_attribute("max_z", p.max_z());
00023     xml_element.x_write(os);
00024 }
00025 
00026 #define VGL_XIO_BOX_3D_INSTANTIATE(T) \
00027 template void x_write(vcl_ostream &, const vgl_box_3d<T > &, vcl_string)
00028 
00029 #endif // vgl_xio_box_3d_txx_