|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r73907 - sandbox/SOC/2011/checks/boost/checks
From: pierre.talbot.6114_at_[hidden]
Date: 2011-08-18 19:37:08
Author: trademark
Date: 2011-08-18 19:37:07 EDT (Thu, 18 Aug 2011)
New Revision: 73907
URL: http://svn.boost.org/trac/boost/changeset/73907
Log:
Add documentation.
Text files modified:
sandbox/SOC/2011/checks/boost/checks/basic_checks.hpp | 35 +++++++++++++++++++++++++++++++++++
1 files changed, 35 insertions(+), 0 deletions(-)
Modified: sandbox/SOC/2011/checks/boost/checks/basic_checks.hpp
==============================================================================
--- sandbox/SOC/2011/checks/boost/checks/basic_checks.hpp (original)
+++ sandbox/SOC/2011/checks/boost/checks/basic_checks.hpp 2011-08-18 19:37:07 EDT (Thu, 18 Aug 2011)
@@ -19,6 +19,23 @@
namespace boost {
namespace checks{
+/*! \fn template <typename algorithm, typename size_contract, typename iterator>
+ int compute_checksum(iterator seq_begin, iterator seq_end )
+
+ \brief Run through a sequence and calculate the checksum with the algorithm policy class.
+
+ \pre seq_begin and seq_end are valid iterators.
+
+ \tparam algorithm is a set of static method use to traduce, filter and calculate the checksum.
+ \tparam size_contract is a contract concerning the size of the sequence.
+ \tparam iterator Must meet the InputIterator requirements.
+ \param seq_begin Beginning of the sequence.
+ \param seq_end Ending of the sequence.
+
+ \throws size_contract::exception_size_failure If the terms of the contract are not respected.
+
+ \returns The checksum of the sequence calculated with algorithm.
+ */
template <typename algorithm, typename size_contract, typename iterator>
int compute_checksum(iterator seq_begin, iterator seq_end )
{
@@ -39,6 +56,24 @@
return checksum ;
}
+/*! \fn template <typename algorithm, typename size_contract, typename check_range>
+ int compute_checksum( const check_range &check_seq )
+
+ \brief Create iterators according to the algorithm::iterator policy. And call the iterator overload version of compute_checksum.
+
+ \pre seq_begin and seq_end are valid iterators.
+
+ \tparam algorithm is a set of static method use to traduce, filter and calculate the checksum.
+ \tparam size_contract is a contract concerning the size of the sequence.
+ \tparam iterator Must meet the InputIterator requirements.
+ \param seq_begin Beginning of the sequence.
+ \param seq_end Ending of the sequence.
+
+ \throws size_contract::exception_size_failure If the terms of the contract are not respected.
+
+ \returns The checksum of the sequence calculated with algorithm.
+*/
+
template <typename algorithm, typename size_contract, typename check_range>
int compute_checksum( const check_range &check_seq )
{
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