include/boost/regex/v5/u32regex_iterator.hpp
89.1% Lines (49/55)
30.0% List of functions (27/90)
Functions (90)
Function
Calls
Lines
Blocks
boost::u32regex_iterator_implementation<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::u32regex_iterator_implementation(boost::basic_regex<int, boost::icu_regex_traits> const*, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, boost::regex_constants::_match_flags)
:51
1x
100.0%
80.0%
boost::u32regex_iterator_implementation<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > >::u32regex_iterator_implementation(boost::basic_regex<int, boost::icu_regex_traits> const*, __gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, boost::regex_constants::_match_flags)
:51
24568x
100.0%
100.0%
boost::u32regex_iterator_implementation<__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > >::u32regex_iterator_implementation(boost::basic_regex<int, boost::icu_regex_traits> const*, __gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >, boost::regex_constants::_match_flags)
:51
0
0.0%
0.0%
boost::u32regex_iterator_implementation<char const*>::u32regex_iterator_implementation(boost::basic_regex<int, boost::icu_regex_traits> const*, char const*, boost::regex_constants::_match_flags)
:51
0
0.0%
0.0%
boost::u32regex_iterator_implementation<char16_t const*>::u32regex_iterator_implementation(boost::basic_regex<int, boost::icu_regex_traits> const*, char16_t const*, boost::regex_constants::_match_flags)
:51
0
0.0%
0.0%
boost::u32regex_iterator_implementation<wchar_t const*>::u32regex_iterator_implementation(boost::basic_regex<int, boost::icu_regex_traits> const*, wchar_t const*, boost::regex_constants::_match_flags)
:51
0
0.0%
0.0%
boost::u32regex_iterator_implementation<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::u32regex_iterator_implementation(boost::u32regex_iterator_implementation<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)
:53
0
0.0%
0.0%
boost::u32regex_iterator_implementation<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > >::u32regex_iterator_implementation(boost::u32regex_iterator_implementation<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > > const&)
:53
19852x
100.0%
100.0%
boost::u32regex_iterator_implementation<__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > >::u32regex_iterator_implementation(boost::u32regex_iterator_implementation<__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > > const&)
:53
0
0.0%
0.0%
boost::u32regex_iterator_implementation<char const*>::u32regex_iterator_implementation(boost::u32regex_iterator_implementation<char const*> const&)
:53
0
0.0%
0.0%
boost::u32regex_iterator_implementation<char16_t const*>::u32regex_iterator_implementation(boost::u32regex_iterator_implementation<char16_t const*> const&)
:53
0
0.0%
0.0%
boost::u32regex_iterator_implementation<wchar_t const*>::u32regex_iterator_implementation(boost::u32regex_iterator_implementation<wchar_t const*> const&)
:53
0
0.0%
0.0%
boost::u32regex_iterator_implementation<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::init(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >)
:54
1x
100.0%
100.0%
boost::u32regex_iterator_implementation<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > >::init(__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >)
:54
24568x
100.0%
100.0%
boost::u32regex_iterator_implementation<__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > >::init(__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >)
:54
0
0.0%
0.0%
boost::u32regex_iterator_implementation<char const*>::init(char const*)
:54
0
0.0%
0.0%
boost::u32regex_iterator_implementation<char16_t const*>::init(char16_t const*)
:54
0
0.0%
0.0%
boost::u32regex_iterator_implementation<wchar_t const*>::init(wchar_t const*)
:54
0
0.0%
0.0%
boost::u32regex_iterator_implementation<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::compare(boost::u32regex_iterator_implementation<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)
:59
0
0.0%
0.0%
boost::u32regex_iterator_implementation<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > >::compare(boost::u32regex_iterator_implementation<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > > const&)
:59
45488x
100.0%
95.0%
boost::u32regex_iterator_implementation<__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > >::compare(boost::u32regex_iterator_implementation<__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > > const&)
:59
0
0.0%
0.0%
boost::u32regex_iterator_implementation<char const*>::compare(boost::u32regex_iterator_implementation<char const*> const&)
:59
0
0.0%
0.0%
boost::u32regex_iterator_implementation<char16_t const*>::compare(boost::u32regex_iterator_implementation<char16_t const*> const&)
:59
0
0.0%
0.0%
boost::u32regex_iterator_implementation<wchar_t const*>::compare(boost::u32regex_iterator_implementation<wchar_t const*> const&)
:59
0
0.0%
0.0%
boost::u32regex_iterator_implementation<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::get()
:64
2x
100.0%
100.0%
boost::u32regex_iterator_implementation<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > >::get()
:64
318416x
100.0%
100.0%
boost::u32regex_iterator_implementation<__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > >::get()
:64
0
0.0%
0.0%
boost::u32regex_iterator_implementation<char const*>::get()
:64
0
0.0%
0.0%
boost::u32regex_iterator_implementation<char16_t const*>::get()
:64
0
0.0%
0.0%
boost::u32regex_iterator_implementation<wchar_t const*>::get()
:64
0
0.0%
0.0%
boost::u32regex_iterator_implementation<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::next()
:66
2x
88.9%
90.0%
boost::u32regex_iterator_implementation<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > >::next()
:66
45488x
100.0%
100.0%
boost::u32regex_iterator_implementation<__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > >::next()
:66
0
0.0%
0.0%
boost::u32regex_iterator_implementation<char const*>::next()
:66
0
0.0%
0.0%
boost::u32regex_iterator_implementation<char16_t const*>::next()
:66
0
0.0%
0.0%
boost::u32regex_iterator_implementation<wchar_t const*>::next()
:66
0
0.0%
0.0%
boost::u32regex_iterator<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::u32regex_iterator()
:100
1x
100.0%
100.0%
boost::u32regex_iterator<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > >::u32regex_iterator()
:100
24568x
100.0%
100.0%
boost::u32regex_iterator<__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > >::u32regex_iterator()
:100
0
0.0%
0.0%
boost::u32regex_iterator<char const*>::u32regex_iterator()
:100
0
0.0%
0.0%
boost::u32regex_iterator<char16_t const*>::u32regex_iterator()
:100
0
0.0%
0.0%
boost::u32regex_iterator<wchar_t const*>::u32regex_iterator()
:100
0
0.0%
0.0%
boost::u32regex_iterator<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::u32regex_iterator(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, boost::basic_regex<int, boost::icu_regex_traits> const&, boost::regex_constants::_match_flags)
:101
1x
80.0%
62.0%
boost::u32regex_iterator<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > >::u32regex_iterator(__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, boost::basic_regex<int, boost::icu_regex_traits> const&, boost::regex_constants::_match_flags)
:101
24568x
100.0%
100.0%
boost::u32regex_iterator<__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > >::u32regex_iterator(__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >, __gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >, boost::basic_regex<int, boost::icu_regex_traits> const&, boost::regex_constants::_match_flags)
:101
0
0.0%
0.0%
boost::u32regex_iterator<char const*>::u32regex_iterator(char const*, char const*, boost::basic_regex<int, boost::icu_regex_traits> const&, boost::regex_constants::_match_flags)
:101
0
0.0%
0.0%
boost::u32regex_iterator<char16_t const*>::u32regex_iterator(char16_t const*, char16_t const*, boost::basic_regex<int, boost::icu_regex_traits> const&, boost::regex_constants::_match_flags)
:101
0
0.0%
0.0%
boost::u32regex_iterator<wchar_t const*>::u32regex_iterator(wchar_t const*, wchar_t const*, boost::basic_regex<int, boost::icu_regex_traits> const&, boost::regex_constants::_match_flags)
:101
0
0.0%
0.0%
boost::u32regex_iterator<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::u32regex_iterator(boost::u32regex_iterator<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)
:111
0
0.0%
0.0%
boost::u32regex_iterator<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > >::u32regex_iterator(boost::u32regex_iterator<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > > const&)
:111
24568x
100.0%
100.0%
boost::u32regex_iterator<__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > >::u32regex_iterator(boost::u32regex_iterator<__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > > const&)
:111
0
0.0%
0.0%
boost::u32regex_iterator<char const*>::u32regex_iterator(boost::u32regex_iterator<char const*> const&)
:111
0
0.0%
0.0%
boost::u32regex_iterator<char16_t const*>::u32regex_iterator(boost::u32regex_iterator<char16_t const*> const&)
:111
0
0.0%
0.0%
boost::u32regex_iterator<wchar_t const*>::u32regex_iterator(boost::u32regex_iterator<wchar_t const*> const&)
:111
0
0.0%
0.0%
boost::u32regex_iterator<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::operator==(boost::u32regex_iterator<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) const
:118
3x
75.0%
67.0%
boost::u32regex_iterator<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > >::operator==(boost::u32regex_iterator<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > > const&) const
:118
92800x
100.0%
100.0%
boost::u32regex_iterator<__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > >::operator==(boost::u32regex_iterator<__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > > const&) const
:118
0
0.0%
0.0%
boost::u32regex_iterator<char const*>::operator==(boost::u32regex_iterator<char const*> const&) const
:118
0
0.0%
0.0%
boost::u32regex_iterator<char16_t const*>::operator==(boost::u32regex_iterator<char16_t const*> const&) const
:118
0
0.0%
0.0%
boost::u32regex_iterator<wchar_t const*>::operator==(boost::u32regex_iterator<wchar_t const*> const&) const
:118
0
0.0%
0.0%
boost::u32regex_iterator<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::operator!=(boost::u32regex_iterator<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) const
:124
3x
100.0%
100.0%
boost::u32regex_iterator<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > >::operator!=(boost::u32regex_iterator<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > > const&) const
:124
70056x
100.0%
100.0%
boost::u32regex_iterator<__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > >::operator!=(boost::u32regex_iterator<__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > > const&) const
:124
0
0.0%
0.0%
boost::u32regex_iterator<char const*>::operator!=(boost::u32regex_iterator<char const*> const&) const
:124
0
0.0%
0.0%
boost::u32regex_iterator<char16_t const*>::operator!=(boost::u32regex_iterator<char16_t const*> const&) const
:124
0
0.0%
0.0%
boost::u32regex_iterator<wchar_t const*>::operator!=(boost::u32regex_iterator<wchar_t const*> const&) const
:124
0
0.0%
0.0%
boost::u32regex_iterator<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::operator*() const
:126
2x
100.0%
100.0%
boost::u32regex_iterator<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > >::operator*() const
:126
90976x
100.0%
100.0%
boost::u32regex_iterator<__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > >::operator*() const
:126
0
0.0%
0.0%
boost::u32regex_iterator<char const*>::operator*() const
:126
0
0.0%
0.0%
boost::u32regex_iterator<char16_t const*>::operator*() const
:126
0
0.0%
0.0%
boost::u32regex_iterator<wchar_t const*>::operator*() const
:126
0
0.0%
0.0%
boost::u32regex_iterator<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > >::operator->() const
:128
227440x
100.0%
100.0%
boost::u32regex_iterator<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::operator++()
:130
2x
100.0%
100.0%
boost::u32regex_iterator<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > >::operator++()
:130
45488x
100.0%
100.0%
boost::u32regex_iterator<__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > >::operator++()
:130
0
0.0%
0.0%
boost::u32regex_iterator<char const*>::operator++()
:130
0
0.0%
0.0%
boost::u32regex_iterator<char16_t const*>::operator++()
:130
0
0.0%
0.0%
boost::u32regex_iterator<wchar_t const*>::operator++()
:130
0
0.0%
0.0%
boost::u32regex_iterator<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::cow()
:149
2x
75.0%
53.0%
boost::u32regex_iterator<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > >::cow()
:149
45488x
100.0%
100.0%
boost::u32regex_iterator<__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > >::cow()
:149
0
0.0%
0.0%
boost::u32regex_iterator<char const*>::cow()
:149
0
0.0%
0.0%
boost::u32regex_iterator<char16_t const*>::cow()
:149
0
0.0%
0.0%
boost::u32regex_iterator<wchar_t const*>::cow()
:149
0
0.0%
0.0%
boost::make_u32regex_iterator(char const*, boost::basic_regex<int, boost::icu_regex_traits> const&, boost::regex_constants::_match_flags)
:163
0
0.0%
0.0%
boost::make_u32regex_iterator(wchar_t const*, boost::basic_regex<int, boost::icu_regex_traits> const&, boost::regex_constants::_match_flags)
:168
0
0.0%
0.0%
boost::u32regex_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::const_iterator> boost::make_u32regex_iterator<char, std::char_traits<char>, std::allocator<char> >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::basic_regex<int, boost::icu_regex_traits> const&, boost::regex_constants::_match_flags)
:180
1x
100.0%
100.0%
boost::u32regex_iterator<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::const_iterator> boost::make_u32regex_iterator<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&, boost::basic_regex<int, boost::icu_regex_traits> const&, boost::regex_constants::_match_flags)
:180
0
0.0%
0.0%
boost::make_u32regex_iterator(icu_74::UnicodeString const&, boost::basic_regex<int, boost::icu_regex_traits> const&, boost::regex_constants::_match_flags)
:185
0
0.0%
0.0%
| Line | TLA | Hits | Source Code |
|---|---|---|---|
| 1 | /* | ||
| 2 | * | ||
| 3 | * Copyright (c) 2003 | ||
| 4 | * John Maddock | ||
| 5 | * | ||
| 6 | * Use, modification and distribution are subject to the | ||
| 7 | * Boost Software License, Version 1.0. (See accompanying file | ||
| 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
| 9 | * | ||
| 10 | */ | ||
| 11 | |||
| 12 | /* | ||
| 13 | * LOCATION: see http://www.boost.org for most recent version. | ||
| 14 | * FILE u32regex_iterator.hpp | ||
| 15 | * VERSION see <boost/version.hpp> | ||
| 16 | * DESCRIPTION: Provides u32regex_iterator implementation. | ||
| 17 | */ | ||
| 18 | |||
| 19 | #ifndef BOOST_REGEX_V5_U32REGEX_ITERATOR_HPP | ||
| 20 | #define BOOST_REGEX_V5_U32REGEX_ITERATOR_HPP | ||
| 21 | |||
| 22 | #include <boost/regex/config.hpp> | ||
| 23 | |||
| 24 | #ifndef BOOST_REGEX_STANDALONE | ||
| 25 | |||
| 26 | #include <boost/config.hpp> | ||
| 27 | #if defined(BOOST_HAS_PRAGMA_ONCE) | ||
| 28 | #pragma once | ||
| 29 | #include <boost/regex/v5/icu.hpp> | ||
| 30 | #endif | ||
| 31 | |||
| 32 | #endif | ||
| 33 | |||
| 34 | #include <boost/regex/v5/match_flags.hpp> | ||
| 35 | #include <boost/regex/v5/match_results.hpp> | ||
| 36 | |||
| 37 | namespace boost{ | ||
| 38 | |||
| 39 | template <class BidirectionalIterator> | ||
| 40 | class u32regex_iterator_implementation | ||
| 41 | { | ||
| 42 | typedef u32regex regex_type; | ||
| 43 | |||
| 44 | match_results<BidirectionalIterator> what; // current match | ||
| 45 | BidirectionalIterator base; // start of sequence | ||
| 46 | BidirectionalIterator end; // end of sequence | ||
| 47 | const regex_type re; // the expression | ||
| 48 | match_flag_type flags; // flags for matching | ||
| 49 | |||
| 50 | public: | ||
| 51 | 24569x | u32regex_iterator_implementation(const regex_type* p, BidirectionalIterator last, match_flag_type f) | |
| 52 | 73707x | : base(), end(last), re(*p), flags(f){} | |
| 53 | 19852x | u32regex_iterator_implementation(const u32regex_iterator_implementation&) = default; | |
| 54 | 24569x | bool init(BidirectionalIterator first) | |
| 55 | { | ||
| 56 | 24569x | base = first; | |
| 57 | 24569x | return u32regex_search(first, end, what, re, flags, base); | |
| 58 | } | ||
| 59 | 45488x | bool compare(const u32regex_iterator_implementation& that) | |
| 60 | { | ||
| 61 | 45488x | if(this == &that) return true; | |
| 62 | 5784x | return (&re.get_data() == &that.re.get_data()) && (end == that.end) && (flags == that.flags) && (what[0].first == that.what[0].first) && (what[0].second == that.what[0].second); | |
| 63 | } | ||
| 64 | 318418x | const match_results<BidirectionalIterator>& get() | |
| 65 | 318418x | { return what; } | |
| 66 | 45490x | bool next() | |
| 67 | { | ||
| 68 | //if(what.prefix().first != what[0].second) | ||
| 69 | // flags |= match_prev_avail; | ||
| 70 | 45490x | BidirectionalIterator next_start = what[0].second; | |
| 71 | 45490x | match_flag_type f(flags); | |
| 72 | 45490x | if(!what.length()) | |
| 73 | 4608x | f |= regex_constants::match_not_initial_null; | |
| 74 | //if(base != next_start) | ||
| 75 | // f |= regex_constants::match_not_bob; | ||
| 76 | 45490x | bool result = u32regex_search(next_start, end, what, re, f, base); | |
| 77 | 45490x | if(result) | |
| 78 | 5785x | what.set_base(base); | |
| 79 | 45490x | return result; | |
| 80 | } | ||
| 81 | private: | ||
| 82 | u32regex_iterator_implementation& operator=(const u32regex_iterator_implementation&); | ||
| 83 | }; | ||
| 84 | |||
| 85 | template <class BidirectionalIterator> | ||
| 86 | class u32regex_iterator | ||
| 87 | { | ||
| 88 | private: | ||
| 89 | typedef u32regex_iterator_implementation<BidirectionalIterator> impl; | ||
| 90 | typedef std::shared_ptr<impl> pimpl; | ||
| 91 | public: | ||
| 92 | typedef u32regex regex_type; | ||
| 93 | typedef match_results<BidirectionalIterator> value_type; | ||
| 94 | typedef typename std::iterator_traits<BidirectionalIterator>::difference_type | ||
| 95 | difference_type; | ||
| 96 | typedef const value_type* pointer; | ||
| 97 | typedef const value_type& reference; | ||
| 98 | typedef std::forward_iterator_tag iterator_category; | ||
| 99 | |||
| 100 | 24569x | u32regex_iterator(){} | |
| 101 | 24569x | u32regex_iterator(BidirectionalIterator a, BidirectionalIterator b, | |
| 102 | const regex_type& re, | ||
| 103 | match_flag_type m = match_default) | ||
| 104 | 24569x | : pdata(new impl(&re, b, m)) | |
| 105 | { | ||
| 106 | 24569x | if(!pdata->init(a)) | |
| 107 | { | ||
| 108 | 4716x | pdata.reset(); | |
| 109 | } | ||
| 110 | 24569x | } | |
| 111 | 24568x | u32regex_iterator(const u32regex_iterator& that) | |
| 112 | 24568x | : pdata(that.pdata) {} | |
| 113 | u32regex_iterator& operator=(const u32regex_iterator& that) | ||
| 114 | { | ||
| 115 | pdata = that.pdata; | ||
| 116 | return *this; | ||
| 117 | } | ||
| 118 | 92803x | bool operator==(const u32regex_iterator& that)const | |
| 119 | { | ||
| 120 | 92803x | if((pdata.get() == 0) || (that.pdata.get() == 0)) | |
| 121 | 47315x | return pdata.get() == that.pdata.get(); | |
| 122 | 45488x | return pdata->compare(*(that.pdata.get())); | |
| 123 | } | ||
| 124 | 70059x | bool operator!=(const u32regex_iterator& that)const | |
| 125 | 70059x | { return !(*this == that); } | |
| 126 | 90978x | const value_type& operator*()const | |
| 127 | 90978x | { return pdata->get(); } | |
| 128 | 227440x | const value_type* operator->()const | |
| 129 | 227440x | { return &(pdata->get()); } | |
| 130 | 45490x | u32regex_iterator& operator++() | |
| 131 | { | ||
| 132 | 45490x | cow(); | |
| 133 | 45490x | if(0 == pdata->next()) | |
| 134 | { | ||
| 135 | 39705x | pdata.reset(); | |
| 136 | } | ||
| 137 | 45490x | return *this; | |
| 138 | } | ||
| 139 | u32regex_iterator operator++(int) | ||
| 140 | { | ||
| 141 | u32regex_iterator result(*this); | ||
| 142 | ++(*this); | ||
| 143 | return result; | ||
| 144 | } | ||
| 145 | private: | ||
| 146 | |||
| 147 | pimpl pdata; | ||
| 148 | |||
| 149 | 45490x | void cow() | |
| 150 | { | ||
| 151 | // copy-on-write | ||
| 152 | 45490x | if(pdata.get() && (pdata.use_count() > 1)) | |
| 153 | { | ||
| 154 | 19852x | pdata.reset(new impl(*(pdata.get()))); | |
| 155 | } | ||
| 156 | 45490x | } | |
| 157 | }; | ||
| 158 | |||
| 159 | typedef u32regex_iterator<const char*> utf8regex_iterator; | ||
| 160 | typedef u32regex_iterator<const UChar*> utf16regex_iterator; | ||
| 161 | typedef u32regex_iterator<const UChar32*> utf32regex_iterator; | ||
| 162 | |||
| 163 | ✗ | inline u32regex_iterator<const char*> make_u32regex_iterator(const char* p, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default) | |
| 164 | { | ||
| 165 | ✗ | return u32regex_iterator<const char*>(p, p+std::strlen(p), e, m); | |
| 166 | } | ||
| 167 | #ifndef BOOST_NO_WREGEX | ||
| 168 | ✗ | inline u32regex_iterator<const wchar_t*> make_u32regex_iterator(const wchar_t* p, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default) | |
| 169 | { | ||
| 170 | ✗ | return u32regex_iterator<const wchar_t*>(p, p+std::wcslen(p), e, m); | |
| 171 | } | ||
| 172 | #endif | ||
| 173 | #if !defined(BOOST_REGEX_UCHAR_IS_WCHAR_T) | ||
| 174 | inline u32regex_iterator<const UChar*> make_u32regex_iterator(const UChar* p, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default) | ||
| 175 | { | ||
| 176 | return u32regex_iterator<const UChar*>(p, p+u_strlen(p), e, m); | ||
| 177 | } | ||
| 178 | #endif | ||
| 179 | template <class charT, class Traits, class Alloc> | ||
| 180 | 1x | inline u32regex_iterator<typename std::basic_string<charT, Traits, Alloc>::const_iterator> make_u32regex_iterator(const std::basic_string<charT, Traits, Alloc>& p, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default) | |
| 181 | { | ||
| 182 | typedef typename std::basic_string<charT, Traits, Alloc>::const_iterator iter_type; | ||
| 183 | 1x | return u32regex_iterator<iter_type>(p.begin(), p.end(), e, m); | |
| 184 | } | ||
| 185 | ✗ | inline u32regex_iterator<const UChar*> make_u32regex_iterator(const U_NAMESPACE_QUALIFIER UnicodeString& s, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default) | |
| 186 | { | ||
| 187 | ✗ | return u32regex_iterator<const UChar*>(s.getBuffer(), s.getBuffer() + s.length(), e, m); | |
| 188 | } | ||
| 189 | |||
| 190 | } // namespace boost | ||
| 191 | |||
| 192 | #endif // BOOST_REGEX_V5_REGEX_ITERATOR_HPP | ||
| 193 | |||
| 194 |