2 #ifndef vbl_io_bounding_box_hxx_ 3 #define vbl_io_bounding_box_hxx_ 9 #include <vsl/vsl_binary_io.h> 13 template<
class T,
class DIM_>
16 constexpr
short io_version_no = 1;
28 template<
class T,
class DIM_>
41 T min_point[DIM_::value], max_point[DIM_::value];
52 std::cerr <<
"I/O ERROR: vsl_b_read(vsl_b_istream&, vbl_bounding_box_base<T, DIM_>&)\n" 53 <<
" Unknown version number "<< v <<
'\n';
54 is.is().clear(std::ios::badbit);
62 template<
class T,
class DIM_>
71 os <<
"min[" << i <<
"] = " << p.
min()[i] <<
'\n';
76 os <<
"max[" << i <<
"] = " << p.
max()[i] <<
'\n';
82 #define VBL_IO_BOUNDING_BOX_INSTANTIATE(T, DIM) \ 83 template void vsl_print_summary(std::ostream&,const vbl_bounding_box_base<T, vbl_bounding_box_DIM<DIM > >&);\ 84 template void vsl_b_read(vsl_b_istream &, vbl_bounding_box_base<T, vbl_bounding_box_DIM<DIM > > &); \ 85 template void vsl_b_write(vsl_b_ostream &, const vbl_bounding_box_base<T, vbl_bounding_box_DIM<DIM > > &) 87 #endif // vbl_io_bounding_box_hxx_
void vsl_b_write(vsl_b_ostream &os, const vbl_bounding_box_base< T, DIM_ > &p)
Binary save self to stream.
void reset()
Reset to empty.
void vsl_print_summary(std::ostream &os, const vbl_bounding_box_base< T, DIM_ > &p)
Output a human readable summary to the stream.
int dimension() const
return dimension.
void vsl_b_read(vsl_b_istream &is, vbl_bounding_box_base< T, DIM_ > &p)
Binary load self from stream.
bool empty() const
Return initialisation status.
void update(T const &x)
Incorporate 1d point x.