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