Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81158 - in sandbox/SOC/2011/checks: boost/checks libs/checks/doc/doxygen
From: pierre.talbot.6114_at_[hidden]
Date: 2012-11-03 10:33:59


Author: trademark
Date: 2012-11-03 10:33:58 EDT (Sat, 03 Nov 2012)
New Revision: 81158
URL: http://svn.boost.org/trac/boost/changeset/81158

Log:
Update the tests and the code.
Text files modified:
   sandbox/SOC/2011/checks/boost/checks/checksum.hpp | 2
   sandbox/SOC/2011/checks/boost/checks/mastercard.hpp | 30 ++++++++++++++--------------
   sandbox/SOC/2011/checks/boost/checks/modulus97.hpp | 8 +++---
   sandbox/SOC/2011/checks/libs/checks/doc/doxygen/doxywarn.log | 41 ++++++++++++++++++++++++++++-----------
   4 files changed, 49 insertions(+), 32 deletions(-)

Modified: sandbox/SOC/2011/checks/boost/checks/checksum.hpp
==============================================================================
--- sandbox/SOC/2011/checks/boost/checks/checksum.hpp (original)
+++ sandbox/SOC/2011/checks/boost/checks/checksum.hpp 2012-11-03 10:33:58 EDT (Sat, 03 Nov 2012)
@@ -111,7 +111,7 @@
 template
 <
   typename Checksum,
- std::size_t size_expected = 0
+ size_t size_expected = 0
>
 struct features : Checksum
 {

Modified: sandbox/SOC/2011/checks/boost/checks/mastercard.hpp
==============================================================================
--- sandbox/SOC/2011/checks/boost/checks/mastercard.hpp (original)
+++ sandbox/SOC/2011/checks/boost/checks/mastercard.hpp 2012-11-03 10:33:58 EDT (Sat, 03 Nov 2012)
@@ -24,13 +24,13 @@
 #include <boost/checks/luhn.hpp>
 #include <boost/checks/checkdigit.hpp>
 
+namespace boost {
+ namespace checks{
+
 /*!
   \brief This macro defines the size of a Mastercard number.
 */
-#define MASTERCARD_SIZE 16
-
-namespace boost {
- namespace checks{
+static const size_t MASTERCARD_SIZE = 16;
 
 typedef features
 <
@@ -39,17 +39,17 @@
> mastercard;
 
 /*!
- \brief Validate a sequence according to the mastercard_check_algorithm type.
-
- \pre check_seq is a valid range.
-
- \tparam check_range is a valid range type.
- \param check_seq is the sequence of value to check.
-
- \throws std::invalid_argument if check_seq doesn't contain exactly MASTERCARD_SIZE digits.
- \throws std::invalid_argument if the two first digits(from the leftmost)don't match the Mastercard pattern.
-
- \returns True if the check digit is correct, false otherwise.
+ \brief Validate a mastercard number.
+ \tparam check_range must meet the requirements of range concept.
+ \param x is the sequence to validate. Nothing is skipped or filtered and the atoms of the sequence are considered as unsigned integers.
+ \returns True if
+ <ul>
+ <li>The sequence has exactly MASTERCARD_SIZE digit.</li>
+ <li>The last digit is a correct checkdigit with the Luhn algorithm.</li>
+ </ul>
+ Otherwise false.
+ \note This function is identical to: check_sequence<mastercard>(x).
+ \sa mastercard, check_sequence, compute_mastercard, check_mastercard(const std::string&).
 */
 template <typename check_range>
 bool check_mastercard(const check_range& x)

Modified: sandbox/SOC/2011/checks/boost/checks/modulus97.hpp
==============================================================================
--- sandbox/SOC/2011/checks/boost/checks/modulus97.hpp (original)
+++ sandbox/SOC/2011/checks/boost/checks/modulus97.hpp 2012-11-03 10:33:58 EDT (Sat, 03 Nov 2012)
@@ -165,13 +165,13 @@
     \returns The check digits are stored into mod97_checkdigits. The range of these is [0..9][0..9].
 */
 template <size_t size_expected, typename check_range>
-std::size_t compute_mod97_10(const check_range& x)
+size_t compute_mod97_10(const check_range& x)
 {
   return compute_checkdigit<features<mod97_10, size_expected> >(x);
 }
 
 template <size_t size_expected>
-std::size_t compute_mod97_10(const std::string& x)
+size_t compute_mod97_10(const std::string& x)
 {
   return compute_checkdigit<features<mod97_10, size_expected> >(make_precheck<digit>(x));
 }
@@ -192,12 +192,12 @@
     \returns The check digits are stored into mod97_checkdigits. The range of these is [0..9][0..9].
 */
 template <typename check_range>
-std::size_t compute_mod97_10(const check_range& x)
+size_t compute_mod97_10(const check_range& x)
 {
   return compute_checkdigit<features<mod97_10> >(x);
 }
 
-std::size_t compute_mod97_10(const std::string& x)
+size_t compute_mod97_10(const std::string& x)
 {
   return compute_checkdigit<features<mod97_10> >(make_precheck<digit>(x));
 }

Modified: sandbox/SOC/2011/checks/libs/checks/doc/doxygen/doxywarn.log
==============================================================================
--- sandbox/SOC/2011/checks/libs/checks/doc/doxygen/doxywarn.log (original)
+++ sandbox/SOC/2011/checks/libs/checks/doc/doxygen/doxywarn.log 2012-11-03 10:33:58 EDT (Sat, 03 Nov 2012)
@@ -1,14 +1,22 @@
-/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/isbn.hpp:83: warning: argument 'check_seq' of command @param is not found in the argument list of boost::checks::check_isbn10(const range &x)
-/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/isbn.hpp:83: warning: The following parameters of boost::checks::check_isbn10(const range &x) are not documented:
+Project logo 'Proposed_for_Boost.png' specified by PROJECT_LOGO does not exist!
+/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/ean.hpp:69: warning: argument 'check_seq' of command @param is not found in the argument list of boost::checks::check_ean13(const check_range &x)
+/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/ean.hpp:69: warning: The following parameters of boost::checks::check_ean13(const check_range &x) are not documented:
+ parameter 'x'
+/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/ean.hpp:116: warning: argument 'check_seq' of command @param is not found in the argument list of boost::checks::check_ean8(const check_range &x)
+/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/ean.hpp:116: warning: The following parameters of boost::checks::check_ean8(const check_range &x) are not documented:
+ parameter 'x'
+/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/isbn.hpp:93: warning: argument 'check_seq' of command @param is not found in the argument list of boost::checks::check_isbn10(const range &x)
+/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/isbn.hpp:93: warning: The following parameters of boost::checks::check_isbn10(const range &x) are not documented:
   parameter 'x'
 /home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/isbn.hpp:40: warning: argument 'check_seq' of command @param is not found in the argument list of boost::checks::check_isbn13(const range &x)
 /home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/isbn.hpp:40: warning: The following parameters of boost::checks::check_isbn13(const range &x) are not documented:
   parameter 'x'
-/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/basic_checks.hpp:61: warning: argument 'check_seq' of command @param is not found in the argument list of boost::checks::check_sequence(range &x)
-/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/basic_checks.hpp:61: warning: The following parameters of boost::checks::check_sequence(range &x) are not documented:
+/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/mastercard.hpp:45: warning: explicit link request to 'MASTERCARD_SIZE' could not be resolved
+/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/basic_checks.hpp:61: warning: argument 'check_seq' of command @param is not found in the argument list of boost::checks::check_sequence(const range &x)
+/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/basic_checks.hpp:61: warning: The following parameters of boost::checks::check_sequence(const range &x) are not documented:
   parameter 'x'
-/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/basic_checks.hpp:89: warning: argument 'check_seq' of command @param is not found in the argument list of boost::checks::compute_checkdigit(range &x)
-/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/basic_checks.hpp:89: warning: The following parameters of boost::checks::compute_checkdigit(range &x) are not documented:
+/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/basic_checks.hpp:89: warning: argument 'check_seq' of command @param is not found in the argument list of boost::checks::compute_checkdigit(const range &x)
+/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/basic_checks.hpp:89: warning: The following parameters of boost::checks::compute_checkdigit(const range &x) are not documented:
   parameter 'x'
 /home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/basic_checks.hpp:29: warning: argument 'seq_begin' of command @param is not found in the argument list of boost::checks::compute_checksum(iterator begin, iterator end, counter_iter &counter)
 /home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/basic_checks.hpp:29: warning: argument 'seq_end' of command @param is not found in the argument list of boost::checks::compute_checksum(iterator begin, iterator end, counter_iter &counter)
@@ -16,11 +24,20 @@
   parameter 'begin'
   parameter 'end'
   parameter 'counter'
-/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/isbn.hpp:101: warning: argument 'check_seq' of command @param is not found in the argument list of boost::checks::compute_isbn10(const range &x)
-/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/isbn.hpp:101: warning: The following parameters of boost::checks::compute_isbn10(const range &x) are not documented:
+/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/ean.hpp:92: warning: argument 'check_seq' of command @param is not found in the argument list of boost::checks::compute_ean13(const check_range &x)
+/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/ean.hpp:92: warning: The following parameters of boost::checks::compute_ean13(const check_range &x) are not documented:
+ parameter 'x'
+/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/ean.hpp:139: warning: argument 'check_seq' of command @param is not found in the argument list of boost::checks::compute_ean8(const check_range &x)
+/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/ean.hpp:139: warning: The following parameters of boost::checks::compute_ean8(const check_range &x) are not documented:
+ parameter 'x'
+/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/isbn.hpp:117: warning: argument 'check_seq' of command @param is not found in the argument list of boost::checks::compute_isbn10(const range &x)
+/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/isbn.hpp:117: warning: The following parameters of boost::checks::compute_isbn10(const range &x) are not documented:
+ parameter 'x'
+/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/isbn.hpp:63: warning: argument 'check_seq' of command @param is not found in the argument list of boost::checks::compute_isbn13(const range &x)
+/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/isbn.hpp:63: warning: The following parameters of boost::checks::compute_isbn13(const range &x) are not documented:
   parameter 'x'
-/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/isbn.hpp:58: warning: argument 'check_seq' of command @param is not found in the argument list of boost::checks::compute_isbn13(const range &x)
-/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/isbn.hpp:58: warning: The following parameters of boost::checks::compute_isbn13(const range &x) are not documented:
+/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/mastercard.hpp:65: warning: argument 'check_seq' of command @param is not found in the argument list of boost::checks::compute_mastercard(const check_range &x)
+/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/mastercard.hpp:65: warning: The following parameters of boost::checks::compute_mastercard(const check_range &x) are not documented:
   parameter 'x'
-/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/modulus97.hpp:140: warning: argument 'mod97_checkdigits' of command @param is not found in the argument list of boost::checks::compute_mod97_10(const check_range &check_seq)
-/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/modulus97.hpp:162: warning: argument 'mod97_checkdigits' of command @param is not found in the argument list of boost::checks::compute_mod97_10(const check_range &check_seq)
+/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/modulus97.hpp:151: warning: argument 'mod97_checkdigits' of command @param is not found in the argument list of boost::checks::compute_mod97_10(const check_range &x)
+/home/trademark/Boost/boost-sandbox/SOC/2011/checks/boost/checks/modulus97.hpp:179: warning: argument 'mod97_checkdigits' of command @param is not found in the argument list of boost::checks::compute_mod97_10(const check_range &x)


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