mirror of
https://github.com/boostorg/endian.git
synced 2025-08-01 05:24:39 +02:00
Endian: add extractors and many more types to binary_stream.hpp, add binary_stream_test.
git-svn-id: http://svn.boost.org/svn/boost/sandbox/endian@51775 b8fc166d-592f-0410-95f2-cb63ce0dd405
This commit is contained in:
@@ -12,126 +12,118 @@
|
||||
|
||||
#include <ostream>
|
||||
#include <istream>
|
||||
#include <string>
|
||||
#include <cstring> // for strlen
|
||||
#include <cwchar> // for wcslen
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
// binary output for built-in types
|
||||
// binary input and output for built-in types
|
||||
|
||||
// omission of bool and void* is deliberate; any semantics would be questionable
|
||||
|
||||
// omission of bool is deliberate; semantics undecided
|
||||
inline std::ostream& operator<=(std::ostream& os, short v)
|
||||
{ return os.write( reinterpret_cast<const char*>(&v), sizeof(v) ); }
|
||||
inline std::istream& operator>=(std::istream& is, short& v)
|
||||
{ return is.read( reinterpret_cast<char*>(&v), sizeof(v) ); }
|
||||
|
||||
inline std::ostream& operator<=(std::ostream& os, unsigned short v)
|
||||
{ return os.write( reinterpret_cast<const char*>(&v), sizeof(v) ); }
|
||||
inline std::istream& operator>=(std::istream& is, unsigned short& v)
|
||||
{ return is.read( reinterpret_cast<char*>(&v), sizeof(v) ); }
|
||||
|
||||
inline std::ostream& operator<=(std::ostream& os, int v)
|
||||
{ return os.write( reinterpret_cast<const char*>(&v), sizeof(v) ); }
|
||||
inline std::istream& operator>=(std::istream& is, int& v)
|
||||
{ return is.read( reinterpret_cast<char*>(&v), sizeof(v) ); }
|
||||
|
||||
inline std::ostream& operator<=(std::ostream& os, unsigned int v)
|
||||
{ return os.write( reinterpret_cast<const char*>(&v), sizeof(v) ); }
|
||||
inline std::istream& operator>=(std::istream& is, unsigned int& v)
|
||||
{ return is.read( reinterpret_cast<char*>(&v), sizeof(v) ); }
|
||||
|
||||
inline std::ostream& operator<=(std::ostream& os, long v)
|
||||
{ return os.write( reinterpret_cast<const char*>(&v), sizeof(v) ); }
|
||||
inline std::istream& operator>=(std::istream& is, long& v)
|
||||
{ return is.read( reinterpret_cast<char*>(&v), sizeof(v) ); }
|
||||
|
||||
inline std::ostream& operator<=(std::ostream& os, unsigned long v)
|
||||
{ return os.write( reinterpret_cast<const char*>(&v), sizeof(v) ); }
|
||||
inline std::istream& operator>=(std::istream& is, unsigned long& v)
|
||||
{ return is.read( reinterpret_cast<char*>(&v), sizeof(v) ); }
|
||||
|
||||
inline std::ostream& operator<=(std::ostream& os, long long v)
|
||||
{ return os.write( reinterpret_cast<const char*>(&v), sizeof(v) ); }
|
||||
inline std::istream& operator>=(std::istream& is, long long& v)
|
||||
{ return is.read( reinterpret_cast<char*>(&v), sizeof(v) ); }
|
||||
|
||||
inline std::ostream& operator<=(std::ostream& os, unsigned long long v)
|
||||
{ return os.write( reinterpret_cast<const char*>(&v), sizeof(v) ); }
|
||||
inline std::istream& operator>=(std::istream& is, unsigned long long& v)
|
||||
{ return is.read( reinterpret_cast<char*>(&v), sizeof(v) ); }
|
||||
|
||||
inline std::ostream& operator<=(std::ostream& os, float v)
|
||||
{ return os.write( reinterpret_cast<const char*>(&v), sizeof(v) ); }
|
||||
inline std::istream& operator>=(std::istream& is, float& v)
|
||||
{ return is.read( reinterpret_cast<char*>(&v), sizeof(v) ); }
|
||||
|
||||
inline std::ostream& operator<=(std::ostream& os, double v)
|
||||
{ return os.write( reinterpret_cast<const char*>(&v), sizeof(v) ); }
|
||||
inline std::istream& operator>=(std::istream& is, double& v)
|
||||
{ return is.read( reinterpret_cast<char*>(&v), sizeof(v) ); }
|
||||
|
||||
inline std::ostream& operator<=(std::ostream& os, long double v)
|
||||
{ return os.write( reinterpret_cast<const char*>(&v), sizeof(v) ); }
|
||||
inline std::ostream& operator<=(std::ostream& os, const void* p)
|
||||
{ return os.write( static_cast<const char*>(p), sizeof(p) ); }
|
||||
inline std::istream& operator>=(std::istream& is, long double& v)
|
||||
{ return is.read( reinterpret_cast<char*>(&v), sizeof(v) ); }
|
||||
|
||||
inline std::ostream& operator<=(std::ostream& os, char c)
|
||||
{ return os.put( c ); }
|
||||
inline std::istream& operator>=(std::istream& is, char& c)
|
||||
{ return is.get( c ); }
|
||||
|
||||
inline std::ostream& operator<=(std::ostream& os, signed char c)
|
||||
{ return os.put( c ); }
|
||||
inline std::istream& operator>=(std::istream& is, signed char& c)
|
||||
{ return is.get( reinterpret_cast<char&>(c) ); }
|
||||
|
||||
inline std::ostream& operator<=(std::ostream& os, unsigned char c)
|
||||
{ return os.put( c ); }
|
||||
inline std::istream& operator>=(std::istream& is, unsigned char& c)
|
||||
{ return is.get( reinterpret_cast<char&>(c) ); }
|
||||
|
||||
inline std::ostream& operator<=(std::ostream& os, wchar_t v)
|
||||
{ return os.write( reinterpret_cast<const char*>(&v), sizeof(v) ); }
|
||||
inline std::istream& operator>=(std::istream& is, wchar_t& v)
|
||||
{ return is.read( reinterpret_cast<char*>(&v), sizeof(v) ); }
|
||||
|
||||
// binary input and output for strings
|
||||
|
||||
inline std::ostream& operator<=(std::ostream& os, const char* p)
|
||||
{ return os.write( p, std::strlen(p)+1 ); }
|
||||
|
||||
inline std::ostream& operator<=(std::ostream& os, const signed char* p)
|
||||
{ return os.write( static_cast<const char*>(p), std::strlen(p)+1 ); }
|
||||
{ return os.write( reinterpret_cast<const char*>(p), std::strlen(reinterpret_cast<const char*>(p))+1 ); }
|
||||
|
||||
inline std::ostream& operator<=(std::ostream& os, const unsigned char* p)
|
||||
{ return os.write( static_cast<const char*>(p), std::strlen(p)+1 ); }
|
||||
{ return os.write( reinterpret_cast<const char*>(p), std::strlen(reinterpret_cast<const char*>(p))+1 ); }
|
||||
|
||||
inline std::ostream& operator<=(std::ostream& os, const wchar_t* p)
|
||||
{ return os.write( reinterpret_cast<const char*>(p), (std::wcslen(p)+1)*sizeof(wchar_t) ); }
|
||||
|
||||
// Caution: note the asymmetry between output and input; a string with embedded
|
||||
// nulls will be output with the embedded nulls, but input will stop at the first null.
|
||||
// So it probably isn't a good idea to use these functions for strings with nulls.
|
||||
inline std::ostream& operator<=(std::ostream& os, const std::string& s)
|
||||
{ return os.write( s.c_str(), s.size()+1 ); }
|
||||
inline std::istream& operator>=(std::istream& is, std::string& s)
|
||||
{ return getline(is, s, '\0'); }
|
||||
|
||||
inline std::ostream& operator<=(std::ostream& os, const std::wstring& s)
|
||||
{ return os.write( reinterpret_cast<const char*>(s.c_str()), (s.size()+1)*sizeof(wchar_t) ); }
|
||||
// TODO: provide input function
|
||||
|
||||
//// 27.6.2.6 Formatted output:
|
||||
//basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>& (*pf)(basic_ostream<charT,traits>&));
|
||||
//basic_ostream<charT,traits>& operator<<(basic_ios<charT,traits>& (*pf)(basic_ios<charT,traits>&));
|
||||
//basic_ostream<charT,traits>& operator<<(ios_base& (*pf)(ios_base&));
|
||||
//basic_ostream<charT,traits>& operator<<(bool n);
|
||||
//basic_ostream<charT,traits>& operator<<(short n);
|
||||
//basic_ostream<charT,traits>& operator<<(unsigned short n);
|
||||
//basic_ostream<charT,traits>& operator<<(int n);
|
||||
//basic_ostream<charT,traits>& operator<<(unsigned int n);
|
||||
//basic_ostream<charT,traits>& operator<<(long n);
|
||||
//basic_ostream<charT,traits>& operator<<(unsigned long n);
|
||||
//basic_ostream<charT,traits>& operator<<(long long n);
|
||||
//basic_ostream<charT,traits>& operator<<(unsigned long long n);
|
||||
//basic_ostream<charT,traits>& operator<<(float f);
|
||||
//basic_ostream<charT,traits>& operator<<(double f);
|
||||
//basic_ostream<charT,traits>& operator<<(long double f);
|
||||
//basic_ostream<charT,traits>& operator<<(const void* p);
|
||||
//basic_ostream<charT,traits>& operator<<(basic_streambuf<char_type,traits>* sb);
|
||||
//
|
||||
//// 27.6.2.6.4 character inserters
|
||||
//template<class charT, class traits>
|
||||
//basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&, charT);
|
||||
//template<class charT, class traits>
|
||||
//basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&&, charT);
|
||||
//template<class charT, class traits>
|
||||
//basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&, char);
|
||||
//template<class charT, class traits>
|
||||
//basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&&, char);
|
||||
//template<class traits>
|
||||
//basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&, char);
|
||||
//template<class traits>
|
||||
//basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&&, char);
|
||||
//
|
||||
//// signed and unsigned
|
||||
//template<class traits>
|
||||
//basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&, signed char);
|
||||
//template<class traits>
|
||||
//basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&&, signed char);
|
||||
//template<class traits>
|
||||
//basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&, unsigned char);
|
||||
//template<class traits>
|
||||
//basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&&, unsigned char);
|
||||
//
|
||||
//template<class charT, class traits>
|
||||
//basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&, const charT*);
|
||||
//template<class charT, class traits>
|
||||
//basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&&, const charT*);
|
||||
//template<class charT, class traits>
|
||||
//basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&, const char*);
|
||||
//template<class charT, class traits>
|
||||
//basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&&, const char*);
|
||||
//template<class traits>
|
||||
//basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&, const char*);
|
||||
//template<class traits>
|
||||
//basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&&, const char*);
|
||||
//
|
||||
//// signed and unsigned
|
||||
//template<class traits>
|
||||
//basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&, const signed char*);
|
||||
//template<class traits>
|
||||
//basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&&, const signed char*);
|
||||
//template<class traits>
|
||||
//basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&, const unsigned char*);
|
||||
//template<class traits>
|
||||
//basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&&, const unsigned char*);
|
||||
//
|
||||
//// 21.3.8.9: inserters and extractors
|
||||
//template<class charT, class traits, class Allocator>
|
||||
//basic_istream<charT,traits>& operator>>(basic_istream<charT,traits>&& is, basic_string<charT,traits,Allocator>& str);
|
||||
//template<class charT, class traits, class Allocator>
|
||||
//basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>&& os, const basic_string<charT,traits,Allocator>& str);
|
||||
//template<class charT, class traits, class Allocator>
|
||||
//basic_istream<charT,traits>& getline(basic_istream<charT,traits>&& is, basic_string<charT,traits,Allocator>& str, charT delim);
|
||||
//template<class charT, class traits, class Allocator>
|
||||
//basic_istream<charT,traits>& getline(basic_istream<charT,traits>&& is, basic_string<charT,traits,Allocator>& str);
|
||||
|
||||
} // namespace boost
|
||||
|
||||
|
@@ -58,11 +58,13 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100%" bgcolor="#E8F5FF">
|
||||
<a href="../../../boost/integer/endian.hpp"><boost/integer/endian.hpp></a></td>
|
||||
<a href="../../../boost/integer/endian.hpp"><boost/integer/endian.hpp></a><br>
|
||||
<a href="../../../boost/integer/endian_io.hpp"><boost/integer/endian_io.hpp></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a name="Introduction">Introduction</a></h2>
|
||||
<p>The <a href="../../../boost/integer/endian.hpp">boost/integer/endian.hpp</a> header provides
|
||||
<p>Header
|
||||
<a href="../../../boost/integer/endian.hpp"><boost/integer/endian.hpp></a> provides
|
||||
integer-like byte-holder binary types with explicit control over
|
||||
byte order, value type, size, and alignment. Typedefs provide easy-to-use names
|
||||
for common configurations.</p>
|
||||
@@ -79,8 +81,7 @@ exploration of <b><i>endianness</i></b>, including definitions of <i><b>big
|
||||
endian</b></i> and <i><b>little endian</b></i>.</p>
|
||||
<p>Boost endian integers provide the same full set of C++ assignment,
|
||||
arithmetic, and relational operators as C++ standard integral types, with
|
||||
the standard semantics, plus operators <code><<</code> and <code>>></code> for
|
||||
stream insertion and extraction.</p>
|
||||
the standard semantics.</p>
|
||||
<p>Unary arithmetic operators are <code>+</code>, <code>-</code>, <code>~</code>,
|
||||
<code>!</code>, prefix and postfix <code>--</code> and <code>++</code>. Binary
|
||||
arithmetic operators are <code>+</code>, <code>+=</code>, <code>-</code>, <code>
|
||||
@@ -89,7 +90,10 @@ arithmetic operators are <code>+</code>, <code>+=</code>, <code>-</code>, <code>
|
||||
<code>^</code>, <code>^=</code>, <code><<</code>, <code><<=</code>, <code>>></code>,
|
||||
<code>>>=</code>. Binary relational operators are <code>==</code>, <code>!=</code>,
|
||||
<code><</code>, <code><=</code>, <code>></code>, <code>>=</code>.</p>
|
||||
<p>Automatic conversion are provided to and from the underlying integer value type.</p>
|
||||
<p>Automatic conversion is provided to the underlying integer value type.</p>
|
||||
<p>Header <a href="../../../boost/integer/endian_io.hpp"><boost/integer/endian_io.hpp></a>
|
||||
provides operators <code><<</code> and <code>>></code> for
|
||||
stream insertion and extraction.</p>
|
||||
<h2><a name="Limitations">Limitations</a></h2>
|
||||
<p>Requires <code><climits></code> <code>CHAR_BIT == 8</code>. If <code>CHAR_BIT</code>
|
||||
is some other value, compilation will result in an <code>#error</code>. This
|
||||
@@ -549,7 +553,7 @@ Tomas Puverle, and
|
||||
Yuval Ronen.</p>
|
||||
<hr>
|
||||
<p>Last revised:
|
||||
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->11 March, 2009<!--webbot bot="Timestamp" endspan i-checksum="29023" --></p>
|
||||
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->12 March, 2009<!--webbot bot="Timestamp" endspan i-checksum="29025" --></p>
|
||||
<p><EFBFBD> Copyright Beman Dawes, 2006</p>
|
||||
<p>Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file <a href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or copy at
|
||||
|
@@ -7,6 +7,7 @@
|
||||
|
||||
// See library home page at http://www.boost.org/libs/endian
|
||||
|
||||
#include <boost/integer/endian.hpp>
|
||||
#include <boost/integer/endian_io.hpp>
|
||||
#include <iostream>
|
||||
|
||||
@@ -15,10 +16,14 @@ using namespace boost::integer;
|
||||
|
||||
int main()
|
||||
{
|
||||
long value = 3224115L; // integer value of ASCII { '1', '2', '3' }
|
||||
big24_t big( value );
|
||||
little24_t little( value );
|
||||
int_least32_t value = 0x313233L; // = 3224115 = ASCII { '1', '2', '3' }
|
||||
big24_t big( value );
|
||||
little24_t little( value );
|
||||
|
||||
std::cout << "Hello, endian world "<< value << ' ' << big << ' ' << little << '\n';
|
||||
std::cout << "Hello, endian world!\n";
|
||||
std::cout << " cout << value--: " << value << " sizeof(value): " << sizeof(value)
|
||||
<< "\n cout << big----: " << big << " sizeof(big): " << sizeof(big)
|
||||
<< "\n cout << little-: " << little << " sizeof(little): " << sizeof(little)
|
||||
<< '\n';
|
||||
}
|
||||
|
||||
|
122
libs/integer/test/binary_stream_test.cpp
Normal file
122
libs/integer/test/binary_stream_test.cpp
Normal file
@@ -0,0 +1,122 @@
|
||||
// binary_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/cstdint.hpp>
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
using namespace boost;
|
||||
using namespace std;
|
||||
|
||||
namespace
|
||||
{
|
||||
int errors = 0;
|
||||
|
||||
void verify( bool x, const char * file, int line )
|
||||
{
|
||||
if ( x ) return;
|
||||
++errors;
|
||||
cout << file << "(" << line << ") : error: predicate is false\n" << endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#define BOOST_VERIFY(predicate) verify( predicate, __FILE__, __LINE__ )
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
std::stringstream ss( std::ios_base::in | std::ios_base::out | std::ios_base::binary );
|
||||
|
||||
short short_1(0x0102), short_2;
|
||||
ss <= short_1;
|
||||
ss >= short_2;
|
||||
BOOST_VERIFY( short_1 == short_2 );
|
||||
|
||||
unsigned short ushort_1(0x0102), ushort_2;
|
||||
ss <= ushort_1;
|
||||
ss >= ushort_2;
|
||||
BOOST_VERIFY( ushort_1 == ushort_2 );
|
||||
|
||||
int int_1(0x01020304), int_2;
|
||||
ss <= int_1;
|
||||
ss >= int_2;
|
||||
BOOST_VERIFY( int_1 == int_2 );
|
||||
|
||||
unsigned int uint_1(0x01020304), uint_2;
|
||||
ss <= uint_1;
|
||||
ss >= uint_2;
|
||||
BOOST_VERIFY( uint_1 == uint_2 );
|
||||
|
||||
long long_1(0x01020304L), long_2;
|
||||
ss <= long_1;
|
||||
ss >= long_2;
|
||||
BOOST_VERIFY( long_1 == long_2 );
|
||||
|
||||
unsigned long ulong_1(0x01020304UL), ulong_2;
|
||||
ss <= ulong_1;
|
||||
ss >= ulong_2;
|
||||
BOOST_VERIFY( ulong_1 == ulong_2 );
|
||||
|
||||
long long long_long_1(0x0102030405060708LL), long_long_2;
|
||||
ss <= long_long_1;
|
||||
ss >= long_long_2;
|
||||
BOOST_VERIFY( long_long_1 == long_long_2 );
|
||||
|
||||
unsigned long long ulong_long_1(0x0102030405060708ULL), ulong_long_2;
|
||||
ss <= ulong_long_1;
|
||||
ss >= ulong_long_2;
|
||||
BOOST_VERIFY( ulong_long_1 == ulong_long_2 );
|
||||
|
||||
float float_1(1.2F), float_2;
|
||||
ss <= float_1;
|
||||
ss >= float_2;
|
||||
BOOST_VERIFY( float_1 == float_2 );
|
||||
|
||||
double double_1(1.2), double_2;
|
||||
ss <= double_1;
|
||||
ss >= double_2;
|
||||
BOOST_VERIFY( double_1 == double_2 );
|
||||
|
||||
long double long_double_1(1.2), long_double_2;
|
||||
ss <= long_double_1;
|
||||
ss >= long_double_2;
|
||||
BOOST_VERIFY( long_double_1 == long_double_2 );
|
||||
|
||||
char char_1(0x01), char_2;
|
||||
ss <= char_1;
|
||||
ss >= char_2;
|
||||
BOOST_VERIFY( char_1 == char_2 );
|
||||
|
||||
signed char schar_1(0x01), schar_2;
|
||||
ss <= schar_1;
|
||||
ss >= schar_2;
|
||||
BOOST_VERIFY( schar_1 == schar_2 );
|
||||
|
||||
unsigned char uchar_1(0x01), uchar_2;
|
||||
ss <= uchar_1;
|
||||
ss >= uchar_2;
|
||||
BOOST_VERIFY( uchar_1 == uchar_2 );
|
||||
|
||||
wchar_t wchar_t_1(L'1'), wchar_t_2;
|
||||
ss <= wchar_t_1;
|
||||
ss >= wchar_t_2;
|
||||
BOOST_VERIFY( wchar_t_1 == wchar_t_2 );
|
||||
|
||||
string string_1("foobar"), string_2;
|
||||
ss <= string_1.c_str();
|
||||
ss >= string_2;
|
||||
BOOST_VERIFY( string_1 == string_2 );
|
||||
ss <= string_1;
|
||||
ss >= string_2;
|
||||
BOOST_VERIFY( string_1 == string_2 );
|
||||
|
||||
cout << errors << " error(s) detected\n";
|
||||
return errors;
|
||||
}
|
@@ -0,0 +1,195 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="binary_stream_test"
|
||||
ProjectGUID="{1382D085-FF3F-4573-8709-E10D3D74D620}"
|
||||
RootNamespace="binary_stream_test"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="196613"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="..\common.vsprops"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="..\common.vsprops"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
EnableIntrinsicFunctions="true"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\binary_stream_test.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
@@ -13,6 +13,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "endian_example", "endian_ex
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "endian_hello_world", "endian_hello_world\endian_hello_world.vcproj", "{1AAEBB4E-501E-417E-9531-04469AF5DD8B}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "binary_stream_test", "binary_stream_test\binary_stream_test.vcproj", "{1382D085-FF3F-4573-8709-E10D3D74D620}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
@@ -43,6 +45,10 @@ Global
|
||||
{1AAEBB4E-501E-417E-9531-04469AF5DD8B}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1AAEBB4E-501E-417E-9531-04469AF5DD8B}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{1AAEBB4E-501E-417E-9531-04469AF5DD8B}.Release|Win32.Build.0 = Release|Win32
|
||||
{1382D085-FF3F-4573-8709-E10D3D74D620}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1382D085-FF3F-4573-8709-E10D3D74D620}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1382D085-FF3F-4573-8709-E10D3D74D620}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{1382D085-FF3F-4573-8709-E10D3D74D620}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@@ -2,8 +2,8 @@
|
||||
|
||||
// Copyright Beman Dawes, 1999-2008
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
// See library home page at http://www.boost.org/libs/endian
|
||||
|
||||
|
Reference in New Issue
Block a user