vsl_vector_io.h
Go to the documentation of this file.
1 // This is core/vsl/vsl_vector_io.h
2 #ifndef vsl_vector_io_h_
3 #define vsl_vector_io_h_
4 //:
5 // \file
6 // \brief binary IO functions for std::vector<T>
7 // \author Tim Cootes
8 
9 #include <iosfwd>
10 #include <vector>
11 #ifdef _MSC_VER
12 # include <vcl_msvc_warnings.h>
13 #endif
14 #include <vsl/vsl_fwd.h>
15 
16 //: Write vector to binary stream
17 template <class T>
18 void vsl_b_write(vsl_b_ostream& s, const std::vector<T>& v);
19 
20 //: Read vector from binary stream
21 template <class T>
22 void vsl_b_read(vsl_b_istream& s, std::vector<T>& v);
23 
24 //: Print human readable summary of object to a stream
25 template <class T>
26 void vsl_print_summary(std::ostream & os,const std::vector<T> &v);
27 
28 
29 //: Write vector<bool> to binary stream
30 template <>
31 void vsl_b_write(vsl_b_ostream& s, const std::vector<bool>& v);
32 
33 //: Read vector<bool> from binary stream
34 template <>
35 void vsl_b_read(vsl_b_istream& s, std::vector<bool>& v);
36 
37 //: Print human readable summary of object to a stream
38 template <>
39 void vsl_print_summary(std::ostream & os,const std::vector<bool> &v);
40 
41 #endif // vsl_vector_io_h_
void vsl_b_read(vsl_b_istream &s, std::vector< T > &v)
Read vector from binary stream.
A binary output adaptor for any std::ostream.
Definition: vsl_binary_io.h:37
void vsl_b_write(vsl_b_ostream &s, const std::vector< T > &v)
Write vector to binary stream.
An adaptor for any std::istream to make it suitable for binary input.
void vsl_print_summary(std::ostream &os, const std::vector< T > &v)
Print human readable summary of object to a stream.