Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73794 - sandbox/SOC/2011/checks/boost/checks
From: pierre.talbot.6114_at_[hidden]
Date: 2011-08-15 15:24:00


Author: trademark
Date: 2011-08-15 15:23:59 EDT (Mon, 15 Aug 2011)
New Revision: 73794
URL: http://svn.boost.org/trac/boost/changeset/73794

Log:
Delete modulus 10 functions.
Add luhn and verhoeff functions.
Text files modified:
   sandbox/SOC/2011/checks/boost/checks/checks_fwd.hpp | 40 ++++++++++++++++++++++++----------------
   1 files changed, 24 insertions(+), 16 deletions(-)

Modified: sandbox/SOC/2011/checks/boost/checks/checks_fwd.hpp
==============================================================================
--- sandbox/SOC/2011/checks/boost/checks/checks_fwd.hpp (original)
+++ sandbox/SOC/2011/checks/boost/checks/checks_fwd.hpp 2011-08-15 15:23:59 EDT (Mon, 15 Aug 2011)
@@ -58,32 +58,40 @@
     #pragma once
 #endif // _MSC_VER
 
-// MPL and PP includes
-#include <boost/mpl/vector_c.hpp>
-#include <boost/mpl/size.hpp>
-#include <boost/mpl/for_each.hpp>
-#include <boost/preprocessor/repetition.hpp>
-// Range include
-#include <boost/range/numeric.hpp>
-// Lexical include
-#include <boost/lexical_cast.hpp>
-#include <boost/checks/modulus10.hpp>
+#include <boost/checks/luhn.hpp>
+#include <boost/checks/verhoeff.hpp>
 
 namespace boost{
   namespace checks{
 
+// Luhn
+
+template <size_t size_expected, typename check_range>
+bool check_luhn (const check_range& check_seq) ;
+
+template <typename check_range>
+bool check_luhn (const check_range& check_seq) ;
+
+template <size_t size_expected, typename check_range>
+typename boost::checks::luhn_compute_algorithm::checkdigit<check_range>::type compute_luhn (const check_range& check_seq) ;
+
+template <typename check_range>
+typename boost::checks::luhn_compute_algorithm::checkdigit<check_range>::type compute_luhn (const check_range& check_seq) ;
+
+// Verhoeff
+
 template <size_t size_expected, typename check_range>
-bool check_mod10 (const check_range& check_seq);
+bool check_verhoeff (const check_range& check_seq) ;
 
 template <typename check_range>
-bool check_mod10 (const check_range& check_seq);
+bool check_verhoeff (const check_range& check_seq) ;
 
 template <size_t size_expected, typename check_range>
-typename boost::checks::mod10_algorithm::checkdigit<check_range>::type compute_mod10 (const check_range& check_seq);
+typename boost::checks::verhoeff_compute_algorithm::checkdigit<check_range>::type compute_verhoeff (const check_range& check_seq) ;
 
 template <typename check_range>
-typename boost::checks::mod10_algorithm::checkdigit<check_range>::type compute_mod10 (const check_range& check_seq);
-
-
+typename boost::checks::verhoeff_compute_algorithm::checkdigit<check_range>::type compute_verhoeff (const check_range& check_seq) ;
+
+
 }}
 #endif \\ BOOST_CHECK_CHECKS_FWD_HPP
\ No newline at end of file


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