Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64266 - in sandbox/SOC/2010/bit_masks: . boost/integer boost/integer/bitfield_tuple boost/integer/detail/bft lib/integer/test/bft_testing
From: bbartmanboost_at_[hidden]
Date: 2010-07-22 12:39:19


Author: bbartman
Date: 2010-07-22 12:39:18 EDT (Thu, 22 Jul 2010)
New Revision: 64266
URL: http://svn.boost.org/trac/boost/changeset/64266

Log:
working moving parts of the public interface into their correct locations.
Added:
   sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple/interface_macros.hpp (contents, props changed)
Text files modified:
   sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple.hpp | 9 +++++++++
   sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/template_expansion_macros.hpp | 22 ++++------------------
   sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/template_expansion_marco_test.cpp | 2 +-
   sandbox/SOC/2010/bit_masks/notes.txt | 30 ++++++------------------------
   4 files changed, 20 insertions(+), 43 deletions(-)

Modified: sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple.hpp 2010-07-22 12:39:18 EDT (Thu, 22 Jul 2010)
@@ -215,7 +215,16 @@
 
 } // end boost
 
+
 #ifdef BOOST_MSVC
 #pragma warning(pop)
 #endif
+#undef BOOST_MAKE_BFT_TEMPLATE_PARAMS
+#undef BOOST_BFT_MAKE_PARAMS
+#undef BOOST_BFT_UNPACK_CALL
+#undef BOOST_BFT_UNPACK_PARAMS
+#undef BOOST_BFT_BASE_TEMPLATE_PARAMS
+#undef BOOST_BFT_PARAMETER_LIST
+#undef BOOST_BFT_PARAM_LIST
+
 #endif

Added: sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple/interface_macros.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple/interface_macros.hpp 2010-07-22 12:39:18 EDT (Thu, 22 Jul 2010)
@@ -0,0 +1,36 @@
+// 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_BFT_INTERFACE_MACROS_HPP
+#define BOOST_BFT_INTERFACE_MACROS_HPP
+
+
+/** Helps produce the sequence T0, ... TN, both with and with out typename
+ * before it.
+ */
+#define BOOST_BFT_INTERFACE_PARAM_LIST(Z,N,DATA) \
+ DATA ## N
+
+/** Used for creating template parameters for specilization.
+ * Creates the following pattern
+ * typename T0, ... typename TN
+ */
+#define BOOST_BFT_TEMPLATE_ARGS_NO_DEFAULTS() \
+ BOOST_PP_ENUM( BOOST_BFT_PARAM_COUNT,\
+ BOOST_BFT_INTERFACE_PARAM_LIST, \
+ typename T )
+
+
+/** Used for specilizing over the bitfield_tuple sequence.
+ * Creates the following pattern
+ * T0, ... TN
+ */
+#define BOOST_BFT_SPECILIZATION_PARAM_LIST() \
+ BOOST_PP_ENUM( BOOST_BFT_PARAM_COUNT,\
+ BOOST_BFT_INTERFACE_PARAM_LIST, \
+ T )
+
+#endif

Modified: sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/template_expansion_macros.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/template_expansion_macros.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/template_expansion_macros.hpp 2010-07-22 12:39:18 EDT (Thu, 22 Jul 2010)
@@ -6,7 +6,7 @@
 
 #include <boost/preprocessor/repetition/enum.hpp>
 #include <boost/preprocessor/repetition/repeat_from_to.hpp>
-
+#include <boost/integer/bitfield_tuple/interface_macros.hpp>
 
 #ifndef BOOST_BITFIELD_TUPLE_TEMPLATE_EXPANSION_MACROS_HPP
 #define BOOST_BITFIELD_TUPLE_TEMPLATE_EXPANSION_MACROS_HPP
@@ -106,9 +106,9 @@
  * T0, ... TN
  */
 #define BOOST_BFT_PARAMETER_LIST() \
- BOOST_PP_ENUM( BOOST_BFT_PARAM_COUNT,\
- BOOST_BFT_PARAM_LIST, \
- T )
+ BOOST_PP_ENUM( BOOST_BFT_PARAM_COUNT,\
+ BOOST_BFT_PARAM_LIST, \
+ T )
 
 /** Creates the template parameters for the bft base or impl class.
  * Creates the following pattern
@@ -119,21 +119,7 @@
                     BOOST_BFT_PARAM_LIST, \
                     typename T )
 
-/** Used for creating template parameters for specilization.
- * Creates the following pattern
- * typename T0, ... typename TN
- */
-#define BOOST_BFT_TEMPLATE_ARGS_NO_DEFAULTS() \
- BOOST_PP_ENUM( BOOST_BFT_PARAM_COUNT,\
- BOOST_BFT_PARAM_LIST, \
- typename T )
 
 
-/** Used for specilizing over the bitfield_tuple sequence.
- * Creates the following pattern
- * T0, ... TN
- */
-#define BOOST_BFT_SPECILIZATION_PARAM_LIST() \
- BOOST_BFT_PARAMETER_LIST()
 
 #endif

Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/template_expansion_marco_test.cpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/template_expansion_marco_test.cpp (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/template_expansion_marco_test.cpp 2010-07-22 12:39:18 EDT (Thu, 22 Jul 2010)
@@ -13,7 +13,7 @@
 using namespace boost;
 using namespace boost::bitfields;
 
-template <BOOST_MAKE_BFT_TEMPLATE_PARAMS()>
+template <BOOST_BFT_TEMPLATE_ARGS_NO_DEFAULTS()>
 struct ham_bone { };
 
 int main() {

Modified: sandbox/SOC/2010/bit_masks/notes.txt
==============================================================================
--- sandbox/SOC/2010/bit_masks/notes.txt (original)
+++ sandbox/SOC/2010/bit_masks/notes.txt 2010-07-22 12:39:18 EDT (Thu, 22 Jul 2010)
@@ -1,31 +1,10 @@
 List of TODO's throughout the bitfield_tuple
 
 1) template_expansion_macros.hpp
- a) TODO: Refactor the macro's which are availible for use external to the
- data structure then undef all of the rest before the end of the data
- structure.
-
- // Internally used Macro's
- #undef BOOST_MAKE_BFT_TEMPLATE_PARAMS
- #undef BOOST_BFT_MAKE_PARAMS
- #undef BOOST_BFT_UNPACK_CALL
- #undef BOOST_BFT_UNPACK_PARAMS
- #undef BOOST_BFT_BASE_TEMPLATE_PARAMS
- #undef BOOST_BFT_PARAMETER_LIST
- #undef BOOST_BFT_PARAM_LIST
-
- // externally Available Macros
- BOOST_BFT_TEMPLATE_ARGS_NO_DEFAULTS
- BOOST_BFT_SPECILIZATION_PARAM_LIST
-
- Main issue is that the externally Available macros are implemented in terms
- of internal macros and undef'ing the internal macros could then cause trouble
- when the macros which are part of the interface are used outside of
- bitfield_tuple's implementation.
-
     b) MAYBE: Rename some of the internal use only macros so they don't
     get confused with macros for external use.
 
+
 2) reference_builder.hpp
     a) TODO: Move the following meta-functions into the boost namespace
     and create some documentation on how they are used/when they are useful.
@@ -260,10 +239,13 @@
 
 
 
-TO BE ADDED TO TESTS SECTION
-Test files which need to be created and have tests placed in them!
+ TO BE ADDED TO TESTS SECTION
+ Test which need to be created as a result of modifications or additions!
+--------------------------------------------------------------------------------
+1) Add interface test for the interface macros.
 
 
+--------------------------------------------------------------------------------
 This is used for keeping track of different ideas about different possible
 interfaces or implementation of bit masks.
 


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