2 #ifndef vsl_list_io_hxx_ 3 #define vsl_list_io_hxx_ 14 # include <vcl_msvc_warnings.h> 27 for (
typename std::list<T>::const_iterator iter = v.begin(); iter != v.end(); iter++)
46 for (
unsigned i=0; i<list_size; i++)
54 std::cerr <<
"I/O ERROR: vsl_b_read(vsl_b_istream&, std::list<T>&)\n" 55 <<
" Unknown version number "<< ver <<
'\n';
56 is.is().clear(std::ios::badbit);
67 os <<
"List length: " << v.size() <<
'\n';
68 for (
typename std::list<T>::const_iterator iter = v.begin();
69 iter != v.end() && i<5; ++iter,++i)
81 #define VSL_LIST_IO_INSTANTIATE(T) \ 82 template void vsl_print_summary(std::ostream&, const std::list<T >&); \ 83 template void vsl_b_write(vsl_b_ostream& s, const std::list<T >& v); \ 84 template void vsl_b_read(vsl_b_istream& s, std::list<T >& v) 86 #endif // vsl_list_io_hxx_ binary IO functions for std::list<T>
A binary output adaptor for any std::ostream.
unsigned short version_no() const
Return the version number of the IO format of the file being read.
std::istream & is() const
A reference to the adaptor's stream.
void vsl_indent_inc(std::ostream &os)
Increments current indent for given stream.
void vsl_print_summary(std::ostream &os, const std::list< T > &v)
Output a human readable summary to the stream.
Put indents into output streams, to produce more legible printed output.
void vsl_indent_dec(std::ostream &os)
Decrements current indent for given stream.
An adaptor for any std::istream to make it suitable for binary input.
Set of functions, and objects to perform binary IO.
void vsl_b_read(vsl_b_istream &is, std::list< T > &v)
Read list from binary stream.
void vsl_b_write(vsl_b_ostream &s, const std::list< T > &v)
Write list to binary stream.