diff --git a/boost/io/detail/bin_manip.hpp b/boost/io/detail/bin_manip.hpp index 624c206..2ccc90d 100644 --- a/boost/io/detail/bin_manip.hpp +++ b/boost/io/detail/bin_manip.hpp @@ -1,14 +1,12 @@ -// boost/binary_stream.hpp ----------------------------------------------------------// +// boost/io/detail/bin_manip.hpp -----------------------------------------------------// // Copyright Beman Dawes 2009, 2011 // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt -// See documentation at http://www.boost.org/libs/utility - -#ifndef BOOST_BINARY_STREAM_HPP -#define BOOST_BINARY_STREAM_HPP +#ifndef BOOST_BIN_MANIP_HPP +#define BOOST_BIN_MANIP_HPP #include #include @@ -20,7 +18,7 @@ # include // for wcslen #endif -// unformatted binary (as opposed to formatted character) input and output +// unformatted binary (as opposed to formatted character) input and output manipulator // Caution: Use only on streams opened with filemode std::ios_base::binary. Thus // unformatted binary I/O should not be with the standard streams (cout, cin, etc.) @@ -79,4 +77,4 @@ inline std::istream& operator>>(std::istream& is, detail::binary_data x) } // namespace boost -#endif // BOOST_BINARY_STREAM_HPP +#endif // BOOST_BIN_MANIP_HPP diff --git a/libs/io/doc/bin_manip.html b/libs/io/doc/bin_manip.html index c431b7b..9e3080d 100644 --- a/libs/io/doc/bin_manip.html +++ b/libs/io/doc/bin_manip.html @@ -6,12 +6,36 @@ Binary Stream I/O - + + + + + + + + +
boost.png (6897 bytes) +

Binary + I/O Manipulators
+ for Binary Streams

+
+ + + + + +
+

Binary + I/O Manipulators + for Strings are not yet accepted into Boost as public components. Thus the + header file is currently located in <boost/io/detail/bin_manip.hpp>

-

Proposal for Binary Stream I/O

Introduction

The C++ standard library's stream I/O facilities are type-safe and very convenient for performing formatted (i.e. human readable) I/O. But they offer only @@ -77,7 +101,7 @@ are implementation supplied types.

return 0; } -

The file produced with be four bytes in length. On a big-endian machine, the +

The file produced will be four bytes in length. On a big-endian machine, the contents in hexadecimal are:

01020304
@@ -88,7 +112,7 @@ contents in hexadecimal are:


Last revised: -24 April, 2011

+26 May, 2011

© Copyright Beman Dawes, 2009, 2011

Distributed under the Boost Software License, Version 1.0. See www.boost.org/ LICENSE_1_0.txt

diff --git a/libs/io/test/Jamfile.v2 b/libs/io/test/Jamfile.v2 index 4b48bce..458b6c6 100644 --- a/libs/io/test/Jamfile.v2 +++ b/libs/io/test/Jamfile.v2 @@ -23,4 +23,5 @@ test-suite "io" ] [ run quoted_manip_test.cpp ] + [ run bin_manip_test.cpp ] ; diff --git a/libs/io/test/bin_manip_test.cpp b/libs/io/test/bin_manip_test.cpp index 97c88ee..95f042b 100644 --- a/libs/io/test/bin_manip_test.cpp +++ b/libs/io/test/bin_manip_test.cpp @@ -1,11 +1,11 @@ -// binary_stream_test.cpp ------------------------------------------------------------// +// bin_manip_test.cpp ----------------------------------------------------------------// // Copyright Beman Dawes 2009 // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt -#include +#include #include #include #include