Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63129 - sandbox/endian_ext/boost/endian
From: vicente.botet_at_[hidden]
Date: 2010-06-20 08:03:38


Author: viboes
Date: 2010-06-20 08:03:36 EDT (Sun, 20 Jun 2010)
New Revision: 63129
URL: http://svn.boost.org/trac/boost/changeset/63129

Log:
endian rename to endianness
Added:
   sandbox/endian_ext/boost/endian/endianness.hpp (contents, props changed)
Text files modified:
   sandbox/endian_ext/boost/endian/domain_map.hpp | 4 ++--
   1 files changed, 2 insertions(+), 2 deletions(-)

Modified: sandbox/endian_ext/boost/endian/domain_map.hpp
==============================================================================
--- sandbox/endian_ext/boost/endian/domain_map.hpp (original)
+++ sandbox/endian_ext/boost/endian/domain_map.hpp 2010-06-20 08:03:36 EDT (Sun, 20 Jun 2010)
@@ -13,7 +13,7 @@
 #ifndef BOOST_ENDIAN_DOMAIN_MAP__HPP
 #define BOOST_ENDIAN_DOMAIN_MAP__HPP
 
-#include <boost/endian/endian.hpp>
+#include <boost/endian/endianness.hpp>
 #include <boost/mpl/vector.hpp>
 #include <boost/mpl/push_back.hpp>
 #include <boost/mpl/void.hpp>
@@ -97,7 +97,7 @@
         typedef typename domain_map<Domain, T>::type type;
     };
 
-} // namespace endian
+} // namespace endianness
 
 } // namespace boost
 

Added: sandbox/endian_ext/boost/endian/endianness.hpp
==============================================================================
--- (empty file)
+++ sandbox/endian_ext/boost/endian/endianness.hpp 2010-06-20 08:03:36 EDT (Sun, 20 Jun 2010)
@@ -0,0 +1,71 @@
+// Boost endian_view.hpp header file -------------------------------------------------------//
+
+// (C) Copyright VicenteJ Botet Escriba 2010
+
+// 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
+
+//--------------------------------------------------------------------------------------//
+
+
+#ifndef BOOST_ENDIAN_ENDIANNESS__HPP
+#define BOOST_ENDIAN_ENDIANNESS__HPP
+
+//~ #include <boost/config.hpp>
+#include <boost/detail/endian.hpp>
+#ifdef BOOST_INTEGER_ENDIAN_USES_ENDIANNESS
+#include <boost/detail/scoped_enum_emulation.hpp>
+#endif
+
+namespace boost {
+
+# ifdef BOOST_INTEGER_ENDIAN_USES_ENDIANNESS
+ // endian class template and specializations ---------------------------------------//
+# ifdef BOOST_BIG_ENDIAN
+ BOOST_SCOPED_ENUM_START(endianness) { big, little, middle, mixed, native=big }; BOOST_SCOPED_ENUM_END
+# else
+ BOOST_SCOPED_ENUM_START(endianness) { big, little, middle, mixed, native=little }; BOOST_SCOPED_ENUM_END
+# endif
+ const BOOST_SCOPED_ENUM_START(endianness) big_endian = endianness::big;
+ const BOOST_SCOPED_ENUM_START(endianness) little_endian = endianness::little;
+ const BOOST_SCOPED_ENUM_START(endianness) middle_endian = endianness::middle;
+ const BOOST_SCOPED_ENUM_START(endianness) mixed_endian = endianness::mixed;
+ const BOOST_SCOPED_ENUM_START(endianness) native_endian = endianness::native;
+#else
+
+namespace endianness {
+
+
+ struct big {
+ //~ static const BOOST_SCOPED_ENUM(endianness) value= endianness::big;
+ };
+ struct little {
+ //~ static const BOOST_SCOPED_ENUM(endianness) value= endianness::little;
+ };
+ struct middle {
+ //~ static const BOOST_SCOPED_ENUM(endianness) value= endianness::middle;
+ };
+ struct mixed {
+ //~ static const BOOST_SCOPED_ENUM(endianness) value= endianness::mixed;
+ };
+# ifdef BOOST_BIG_ENDIAN
+ typedef big native ;
+# else
+ typedef little native ;
+# endif
+
+}
+
+ typedef endianness::big big_endian;
+ typedef endianness::little little_endian;
+ typedef endianness::middle middle_endian;
+ typedef endianness::mixed mixed_endian;
+ typedef endianness::native native_endian;
+# endif
+
+} // namespace boost
+
+
+#endif // BOOST_ENDIAN_ENDIANNESS__HPP


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk