2 #ifndef vbl_io_array_1d_hxx_ 3 #define vbl_io_array_1d_hxx_ 11 #include <vsl/vsl_binary_io.h> 19 constexpr
short io_version_no = 1;
22 int array_size = (int)(p.
size());
24 int array_capacity = (int)(p.
capacity());
26 for (
int i=0; i < array_size; ++i)
48 for (
int i=0; i<array_size; ++i)
56 std::cerr <<
"I/O ERROR: vsl_b_read(vsl_b_istream&, vbl_array_1d<T>&)\n" 57 <<
" Unknown version number "<< ver <<
'\n';
58 is.is().clear(std::ios::badbit);
69 os<<
"Length: "<<p.
size()<<std::endl;
70 for (
unsigned int i =0; i < p.
size() && i < 5; i++ )
72 os <<
' ' << i <<
": ";
80 #define VBL_IO_ARRAY_1D_INSTANTIATE(T) \ 81 template void vsl_print_summary(std::ostream &, const vbl_array_1d<T > &); \ 82 template void vsl_b_read(vsl_b_istream &, vbl_array_1d<T > &); \ 83 template void vsl_b_write(vsl_b_ostream &, const vbl_array_1d<T > &) 85 #endif // vbl_io_array_1d_hxx_
size_type capacity() const
void vsl_b_read(vsl_b_istream &is, vbl_array_1d< T > &p)
Binary load self from stream.
void vsl_b_write(vsl_b_ostream &os, const vbl_array_1d< T > &p)
Binary save self to stream.
void push_back(T const &x)
void vsl_print_summary(std::ostream &os, const vbl_array_1d< T > &p)
Output a human readable summary to the stream.
void reserve(std::ptrdiff_t new_n)