Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r62444 - sandbox/SOC/2010/bit_masks/lib/integer/doc
From: bbartmanboost_at_[hidden]
Date: 2010-06-05 10:53:30


Author: bbartman
Date: 2010-06-05 10:53:29 EDT (Sat, 05 Jun 2010)
New Revision: 62444
URL: http://svn.boost.org/trac/boost/changeset/62444

Log:
completed documentation for thing which have been completed
Text files modified:
   sandbox/SOC/2010/bit_masks/lib/integer/doc/high_bits.qbk | 20 +++++++++---------
   sandbox/SOC/2010/bit_masks/lib/integer/doc/low_bits.qbk | 41 ++++++++++++++++++++++++++++++++-------
   sandbox/SOC/2010/bit_masks/lib/integer/doc/main.qbk | 34 +++++++++++++++++++++++++++++---
   3 files changed, 73 insertions(+), 22 deletions(-)

Modified: sandbox/SOC/2010/bit_masks/lib/integer/doc/high_bits.qbk
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/doc/high_bits.qbk (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/doc/high_bits.qbk 2010-06-05 10:53:29 EDT (Sat, 05 Jun 2010)
@@ -1,23 +1,23 @@
 [c++]
-[section:high_bits high_bits]
+[section:high_bits_maskbits high_bits_mask]
 [h3 Description]
-THe template `high_bits` preforms bitwise operations on compile time then
-exposes the newly created mask via `value` and `operator T()`. What `high_bits`
+THe template `high_bits_mask` preforms bitwise operations on compile time then
+exposes the newly created mask via `value` and `operator T()`. What `high_bits_mask`
 does is create a mask inside your integral type which sets all bits starting
 from the left most bit reaching out width bits to the right. For example,
 ``
 // using high bits to create a mask starting from the left most bit with a width
 // of 15
-typedef high_bits<int, 15> bits;
+typedef high_bits_mask<int, 15> bits;
 // bits::value will have the following value in binary.
 // 1111 1111 1111 1110 0000 0000 0000 0000
 ``
 
 [h3 Template Signature]
-`high_bits` has the following template signature:
+`high_bits_mask` has the following template signature:
 ``
 template <typename T, unsigned int Width>
-struct high_bits;
+struct high_bits_mask;
 ``
 
 [table
@@ -27,8 +27,8 @@
 ]
 
 [h3 Interface]
-`high_bits` Compile time interface. Assume that N is of type
-`high_bits` the type supplied here is only for example.
+`high_bits_mask` Compile time interface. Assume that N is of type
+`high_bits_mask<int, 10>` the type supplied here is only for example.
 
 [table
     [[Operation][Description]]
@@ -43,12 +43,12 @@
 
 
 [h3 Examples]
-Examples and use cases related to the `high_bits` type.
+Examples and use cases related to the `high_bits_mask` template.
 
 
 Exaple:
 ``
-typedef high_bits<int,4> mask;
+typedef high_bits_mask<int,4> mask;
 
 // binary for mask::value
 // 1111 0000 0000 0000 0000 0000 0000 0000

Modified: sandbox/SOC/2010/bit_masks/lib/integer/doc/low_bits.qbk
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/doc/low_bits.qbk (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/doc/low_bits.qbk 2010-06-05 10:53:29 EDT (Sat, 05 Jun 2010)
@@ -1,29 +1,42 @@
 [c++]
-[section:MASKNAME MASKNAME]
+[section:low_bits_mask low_bits_mask]
 [h3 Description]
+`low_bits_mask` creates a mask of bits starting from the right most bit and
+extending out to the left. The `low_bits_mask` is similar to the `high_bits_mask`
+just starts on the right most bit instead of the left most bit. The way
+`low_bits_mask` behaves in the following example:
 
+``
+typedef low_bits_mask<int, 10> mask;
+// mask::value has the following binary value
+// 0000 0000 0000 0000 0000 0011 1111 1111
+``
+The `low_bits_mask` template is located in the <boost/integer/low_bits_mask.hpp>
+header file.
 
 [h3 Template Signature]
 `TYPENME` has the following template signature:
 ``
-TEMPLATE SIGNATURE.
+template <typename T, unsigned int Width>
+struct low_bits_mask;
 ``
 
 [table
     [[Parameter][Description]]
- [[][ ]]
- [[][ ]]
+ [[`T`][ Is an integral type which the mask is to be created over. ]]
+ [[`Width`][ This is the width of the mask in bits. ]]
 ]
 
 [h3 Interface]
-`TYPENAME` Compile time interface. Assume that N is of type
-`N TYPE` the type supplied here is only for example.
+`low_bits_mask` Compile time interface. Assume that `N` is of type
+`low_bits_mask<int,10>` the type supplied here is only for example.
 
 [table
     [[Operation][Description]]
     [[`N::value`][Returns the `value` associated with `N`. ]]
     [[`N::value_type`][Returns `T` which is the type associated with `value` inside `N`. ]]
     [[`N::type`][ Returns the current types type. ]]
+ [[`N::width`][ Returns the integral value associated with the `width` template parameter. ]]
     [[`operator T()`][ Run time support function. All this function does is
 return the value associated with the type. With the c++0x feature constexper
 this function will be made fasters and more effieient.]]
@@ -31,12 +44,24 @@
 
 
 [h3 Examples]
-Examples and use cases related to the `TYPENAME` type.
+Examples and use cases related to the `low_bits_mask` template.
 
 
 Exaple:
 ``
- EXAMPLE
+typedef low_bits_mask<int,4> mask;
+
+// binary for mask::value
+// 0000 0000 0000 0000 0000 0000 0000 1111
+
+int integral_value = 0xc000000c;
+
+// integral_value's binary value
+// 1100 0000 0000 0000 0000 0000 0000 1100
+
+int result = integral_value & mask();
+// binary value of result
+// 0000 0000 0000 0000 0000 0000 0000 1100
 ``
 
 The implicit cast operator allows for simplicity, clairity of code. In the

Modified: sandbox/SOC/2010/bit_masks/lib/integer/doc/main.qbk
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/doc/main.qbk (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/doc/main.qbk 2010-06-05 10:53:29 EDT (Sat, 05 Jun 2010)
@@ -17,9 +17,35 @@
 [table
    [[Component][Header][Contence]]
    [
- [`Integral_mask` type]
+ [`integral_mask` type]
       [ [^[@http://svn.boost.org/svn/boost/sandbox/SOC/2010/bit_masks/boost/integer/integral_mask.hpp <boost/integer/integral_mask.hpp>]]]
- [ Header contains `integral_mask` type]
+ [ Header contains `integral_mask` type. ]
+ ]
+ [
+ [`high_bits_mask` type]
+ [ [^[@http://svn.boost.org/svn/boost/sandbox/SOC/2010/bit_masks/boost/integer/high_bits_mask.hpp <boost/integer/high_bits_mask.hpp>]]]
+ [ Header contains `high_bits_mask` type. ]
+ ]
+ [
+ [`low_bits_mask` type]
+ [ [^[@http://svn.boost.org/svn/boost/sandbox/SOC/2010/bit_masks/boost/integer/low_bits_mask.hpp <boost/integer/low_bits_mask.hpp>]]]
+ [ Header contains `low_bits_mask` type. ]
+ ]
+
+ [
+ [ `high_bits_mask` type and `low_bits_mask` type ]
+ [ [^[@http://svn.boost.org/svn/boost/sandbox/SOC/2010/bit_masks/boost/integer/high_low_bits.hpp <boost/integer/high_low_bits.hpp>]]]
+ [ Header contains includes for `high_bits_mask` and `low_bits_mask`. ]
+ ]
+ [
+ [`compound_mask` type]
+ [ [^[@http://svn.boost.org/svn/boost/sandbox/SOC/2010/bit_masks/boost/integer/compound_mask.hpp <boost/integer/compound_mask.hpp>]]]
+ [ Header contains `compound_mask` type. ]
+ ]
+ [
+ [`bit_mask_group` type]
+ [ [^[@http://svn.boost.org/svn/boost/sandbox/SOC/2010/bit_masks/boost/integer/bit_mask_group.hpp <boost/integer/bit_mask_group.hpp>]]]
+ [ Header contains `bit_mask_group` type. ]
    ]
 ]
 
@@ -62,5 +88,5 @@
 [endsect]
 
 [include:integral_mask integral_mask.qbk]
-[include:high_bits high_bits.qbk]
-
+[include:high_bits_mask high_bits.qbk]
+[include:low_bits_mask low_bits.qbk]


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