Get test going, start on docs

git-svn-id: http://svn.boost.org/svn/boost/sandbox/endian@72194 b8fc166d-592f-0410-95f2-cb63ce0dd405
This commit is contained in:
bemandawes
2011-05-26 19:19:04 +00:00
parent 64e8d41732
commit 5d906e49f7
4 changed files with 36 additions and 13 deletions

View File

@@ -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 <boost/config.hpp>
#include <ostream>
@@ -20,7 +18,7 @@
# include <cwchar> // 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<T> x)
} // namespace boost
#endif // BOOST_BINARY_STREAM_HPP
#endif // BOOST_BIN_MANIP_HPP

View File

@@ -6,12 +6,36 @@
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Binary Stream I/O</title>
<link rel="stylesheet" type="text/css" href="../../../doc/html/minimal.css">
<link rel="stylesheet" type="text/css" href="../../../doc/src/minimal.css">
</head>
<body>
<table border="0" cellpadding="5" cellspacing="0"
style="border-collapse: collapse">
<tbody>
<tr>
<td width="277"><a href="../../../index.htm"><img
src="../../../boost.png" alt="boost.png (6897 bytes)" align="middle"
width="300" height="86" border="0" /></a></td>
<td>
<h1 align="center">Binary
I/O Manipulators<br>
for Binary Streams</h1>
</td>
</tr>
</tbody>
</table>
<table border="1" cellpadding="5" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td>
<p align="center"><b>Binary
I/O Manipulators
for Strings are not yet accepted into Boost as public components. Thus the
header file is currently located in &lt;boost/io/detail/bin_manip.hpp&gt;</b></td>
</tr>
</table>
<h1>Proposal for Binary Stream I/O</h1>
<h2>Introduction</h2>
<p>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.</p>
return 0;
}</pre>
</blockquote>
<p>The file produced with be four bytes in length. On a big-endian machine, the
<p>The file produced will be four bytes in length. On a big-endian machine, the
contents in hexadecimal are:</p>
<blockquote>
<pre>01020304</pre>
@@ -88,7 +112,7 @@ contents in hexadecimal are:</p>
</blockquote>
<hr>
<p>Last revised:
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->24 April, 2011<!--webbot bot="Timestamp" endspan i-checksum="29830" --></p>
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->26 May, 2011<!--webbot bot="Timestamp" endspan i-checksum="13972" --></p>
<p><EFBFBD> Copyright Beman Dawes, 2009, 2011</p>
<p>Distributed under the Boost Software License, Version 1.0. See
<a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/ LICENSE_1_0.txt</a></p>

View File

@@ -23,4 +23,5 @@ test-suite "io"
]
[ run quoted_manip_test.cpp ]
[ run bin_manip_test.cpp ]
;

View File

@@ -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 <boost/binary_stream.hpp>
#include <boost/io/detail/bin_manip.hpp>
#include <string>
#include <iostream>
#include <sstream>