Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64133 - sandbox/SOC/2010/bit_masks/boost/integer/detail/bft
From: bbartmanboost_at_[hidden]
Date: 2010-07-18 12:09:06


Author: bbartman
Date: 2010-07-18 12:09:05 EDT (Sun, 18 Jul 2010)
New Revision: 64133
URL: http://svn.boost.org/trac/boost/changeset/64133

Log:
setting up information passing system which will pass information from during parsing inside of the bitfield_element type's policy class for use in extracting infomration from the pointer later on. the infomration being stored must also be used for adjusting the mask which the hides the pointer
Text files modified:
   sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/arg_parse_impl.hpp | 13 ++++++++++---
   sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/pointer_packing_policy.hpp | 28 ++++++++++++++++++++++++++--
   2 files changed, 36 insertions(+), 5 deletions(-)

Modified: sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/arg_parse_impl.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/arg_parse_impl.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/arg_parse_impl.hpp 2010-07-18 12:09:05 EDT (Sun, 18 Jul 2010)
@@ -449,7 +449,7 @@
>::type data_offset;
 
     // calculating next offset/width for the next field.
- typedef typename mpl::plus<size_of_storage, data_offset>::type offset;
+ typedef typename mpl::plus< size_of_storage, data_offset >::type offset;
  
     typedef bitfields::pointer< ReturnType, Name, Mask > param;
 
@@ -462,9 +462,16 @@
             data_offset,
             size_of_storage,
             Mask,
- pointer_packing_policy<ReturnType>
+ pointer_packing_policy<
+ Mask,
+ ReturnType*,
+ offset,
+ size_of_storage,
+ mpl::true_,
+ bit_shift::none
+ >
>
- >::type field_vector;
+ >::type field_vector;
 
     typedef bft_arg_parse_impl<param,storage_policy,field_vector,offset> type;
 

Modified: sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/pointer_packing_policy.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/pointer_packing_policy.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/pointer_packing_policy.hpp 2010-07-18 12:09:05 EDT (Sun, 18 Jul 2010)
@@ -9,9 +9,33 @@
 
 namespace boost { namespace detail {
 
-template <typename T>
+namespace bit_shift {
+struct right;
+struct left;
+struct none;
+}
+
+template <
+ typename Mask,
+ typename ValueType,
+ typename Offset,
+ typename Width,
+ typename IsAligned,
+ typename DirectionShifted
+>
 struct pointer_packing_policy {
-
+
+ typedef Offset offset;
+ typedef Width width;
+ typedef ValueType value_type;
+ typedef IsAligned is_aligned;
+ typedef DirectionShifted shift_direction;
+ template <typename StorageType>
+ struct apply {
+ typedef StorageType storage_type;
+
+ // static value_type get(storage_type const& )
+ };
 
 };
 


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