1 // Boost string_algo library concept.hpp header file ---------------------------//
3 // Copyright Pavol Droba 2002-2003.
5 // Distributed under the Boost Software License, Version 1.0.
6 // (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
9 // See http://www.boost.org/ for updates, documentation, and revision history.
11 #ifndef BOOST_STRING_CONCEPT_HPP
12 #define BOOST_STRING_CONCEPT_HPP
14 #include <boost/concept_check.hpp>
15 #include <boost/range/iterator_range_core.hpp>
16 #include <boost/range/begin.hpp>
17 #include <boost/range/end.hpp>
20 Defines concepts used in string_algo library
28 Defines the Finder concept. Finder is a functor which selects
29 an arbitrary part of a string. Search is performed on
30 the range specified by starting and ending iterators.
32 Result of the find operation must be convertible to iterator_range.
34 template<typename FinderT, typename IteratorT>
38 typedef iterator_range<IteratorT> range;
54 Defines the Formatter concept. Formatter is a functor, which
55 takes a result from a finder operation and transforms it
58 Result must be a container supported by container_traits,
61 template<typename FormatterT, typename FinderT, typename IteratorT>
62 struct FormatterConcept
68 ::boost::begin((*pFo)( (*pF)(i,i) ));
69 ::boost::end((*pFo)( (*pF)(i,i) ));
75 }; // FormatterConcept;
77 } // namespace algorithm
83 #endif // BOOST_STRING_CONCEPT_HPP