$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r63211 - in sandbox/SOC/2010/bit_masks/boost/integer/details: . bft
From: bbartmanboost_at_[hidden]
Date: 2010-06-21 18:41:15
Author: bbartman
Date: 2010-06-21 18:41:12 EDT (Mon, 21 Jun 2010)
New Revision: 63211
URL: http://svn.boost.org/trac/boost/changeset/63211
Log:
adding header file for padding or filler bits
Added:
   sandbox/SOC/2010/bit_masks/boost/integer/details/bit_filler.hpp   (contents, props changed)
Text files modified: 
   sandbox/SOC/2010/bit_masks/boost/integer/details/bft/arg_parse_impl.hpp |    64 +++++++++++++++++++++++++++++++++++++++ 
   sandbox/SOC/2010/bit_masks/boost/integer/details/bit_flag.hpp           |    27 ++++++++++++++++                        
   2 files changed, 90 insertions(+), 1 deletions(-)
Modified: sandbox/SOC/2010/bit_masks/boost/integer/details/bft/arg_parse_impl.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/details/bft/arg_parse_impl.hpp	(original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/details/bft/arg_parse_impl.hpp	2010-06-21 18:41:12 EDT (Mon, 21 Jun 2010)
@@ -13,7 +13,7 @@
 #include <boost/mpl/if.hpp>
 #include <boost/mpl/find_if.hpp>
 #include <boost/integer/details/bft/name_lookup.hpp>
-
+#include <boost/integer/details/bit_flag.hpp>
 
 namespace boost { namespace details {
 
@@ -171,6 +171,68 @@
     };
 };
 
+/* Specialization for flag. */
+template <  typename StoragePolicy,
+            typename FieldVector,
+            typename NameType,
+            typename Offset
+>
+struct bft_arg_parse_impl <
+    flag <NameType>,
+    StoragePolicy,
+    FieldVector,
+    Offset >
+{
+    // make sure that the name doesn't already exist.
+    BOOST_STATIC_ASSERT((
+        is_same<
+            typename mpl::find_if<
+                FieldVector,
+                details::match_name<
+                    typename mpl::_1,
+                    NameType
+                >
+            >::type,
+            typename mpl::end<
+                FieldVector
+            >::type
+        >::value            
+    ));
+
+
+    typedef flag< NameType > param;
+
+    typedef StoragePolicy   storage_policy;
+    typedef typename mpl::push_back<
+        FieldVector,
+        bitfield_element<
+            bool,
+            NameType,
+            Offset,
+            mpl::size_t<1>
+        >
+    >::type field_vector;
+
+    typedef mpl::size_t< 
+        mpl::plus<
+            Offset,
+            mpl::size_t<1>
+        >::value
+    >                                   offset;
+
+    typedef bft_arg_parse_impl<param,storage_policy,field_vector,offset> type;
+
+    template <typename NextParam>
+    struct process {
+        typedef bft_arg_parse_impl<
+            NextParam,
+            storage_policy,
+            field_vector,
+            offset
+        > type;
+    };
+};
+
 }} // end boost::details
 
 #endif
Added: sandbox/SOC/2010/bit_masks/boost/integer/details/bit_filler.hpp
==============================================================================
Modified: sandbox/SOC/2010/bit_masks/boost/integer/details/bit_flag.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/details/bit_flag.hpp	(original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/details/bit_flag.hpp	2010-06-21 18:41:12 EDT (Mon, 21 Jun 2010)
@@ -0,0 +1,27 @@
+//  Copyright 2010 Brian Bartman.
+//  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)
+
+
+#ifndef BOOST_FLAG_FIELD_HPP
+#define BOOST_FLAG_FIELD_HPP
+
+
+
+namespace boost {
+
+
+
+/** Allows the user to simplify the creation of a bool member by simply 
+ *  requiring that they specify a name and assuming that if the flag is used
+ *  that the underlying type's width is going to be 1.
+ */
+template <typename ReturnType>
+struct flag;
+
+
+
+} // end boost
+
+#endif