Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::xpressive::regex_token_iterator< BidiIter > Struct Template Reference

#include <xpressive_fwd.hpp>

Public Types

typedef basic_regex< BidiIter > regex_type
 
typedef iterator_value
< BidiIter >::type 
char_type
 
typedef sub_match< BidiIter > value_type
 
typedef std::ptrdiff_t difference_type
 
typedef value_type const * pointer
 
typedef value_type const & reference
 
typedef std::forward_iterator_tag iterator_category
 
typedef
detail::regex_token_iterator_impl
< BidiIter > 
impl_type_
 INTERNAL ONLY. More...
 

Public Member Functions

 regex_token_iterator ()
 
 regex_token_iterator (BidiIter begin, BidiIter end, basic_regex< BidiIter > const &rex)
 
template<typename LetExpr >
 regex_token_iterator (BidiIter begin, BidiIter end, basic_regex< BidiIter > const &rex, detail::let_< LetExpr > const &args)
 
template<typename Subs >
 regex_token_iterator (BidiIter begin, BidiIter end, basic_regex< BidiIter > const &rex, Subs const &subs, regex_constants::match_flag_type flags=regex_constants::match_default)
 
template<typename Subs , typename LetExpr >
 regex_token_iterator (BidiIter begin, BidiIter end, basic_regex< BidiIter > const &rex, Subs const &subs, detail::let_< LetExpr > const &args, regex_constants::match_flag_type flags=regex_constants::match_default)
 
 regex_token_iterator (regex_token_iterator< BidiIter > const &that)
 
regex_token_iterator< BidiIter > & operator= (regex_token_iterator< BidiIter > const &that)
 
value_type const & operator* () const
 
value_type const * operator-> () const
 
regex_token_iterator< BidiIter > & operator++ ()
 If N == -1 then sets *this equal to the end of sequence iterator. More...
 
regex_token_iterator< BidiIter > operator++ (int)
 

Friends

bool operator== (regex_token_iterator< BidiIter > const &left, regex_token_iterator< BidiIter > const &right)
 
bool operator!= (regex_token_iterator< BidiIter > const &left, regex_token_iterator< BidiIter > const &right)
 

Member Typedef Documentation

template<typename BidiIter>
typedef iterator_value<BidiIter>::type boost::xpressive::regex_token_iterator< BidiIter >::char_type
template<typename BidiIter>
typedef std::ptrdiff_t boost::xpressive::regex_token_iterator< BidiIter >::difference_type
template<typename BidiIter>
typedef detail::regex_token_iterator_impl<BidiIter> boost::xpressive::regex_token_iterator< BidiIter >::impl_type_

INTERNAL ONLY.

template<typename BidiIter>
typedef std::forward_iterator_tag boost::xpressive::regex_token_iterator< BidiIter >::iterator_category
template<typename BidiIter>
typedef value_type const* boost::xpressive::regex_token_iterator< BidiIter >::pointer
template<typename BidiIter>
typedef value_type const& boost::xpressive::regex_token_iterator< BidiIter >::reference
template<typename BidiIter>
typedef basic_regex<BidiIter> boost::xpressive::regex_token_iterator< BidiIter >::regex_type
template<typename BidiIter>
typedef sub_match<BidiIter> boost::xpressive::regex_token_iterator< BidiIter >::value_type

Constructor & Destructor Documentation

template<typename BidiIter>
boost::xpressive::regex_token_iterator< BidiIter >::regex_token_iterator ( )
inline
Postcondition
*this is the end of sequence iterator.
template<typename BidiIter>
boost::xpressive::regex_token_iterator< BidiIter >::regex_token_iterator ( BidiIter  begin,
BidiIter  end,
basic_regex< BidiIter > const &  rex 
)
inline
Parameters
beginThe beginning of the character range to search.
endThe end of the character range to search.
rexThe regex pattern to search for.
Precondition
[begin,end) is a valid range.

References boost::xpressive::basic_regex< BidiIter >::regex_id().

template<typename BidiIter>
template<typename LetExpr >
boost::xpressive::regex_token_iterator< BidiIter >::regex_token_iterator ( BidiIter  begin,
BidiIter  end,
basic_regex< BidiIter > const &  rex,
detail::let_< LetExpr > const &  args 
)
inline
Parameters
beginThe beginning of the character range to search.
endThe end of the character range to search.
rexThe regex pattern to search for.
argsA let() expression with argument bindings for semantic actions.
Precondition
[begin,end) is a valid range.

References boost::xpressive::detail::bind_args(), and boost::xpressive::basic_regex< BidiIter >::regex_id().

template<typename BidiIter>
template<typename Subs >
boost::xpressive::regex_token_iterator< BidiIter >::regex_token_iterator ( BidiIter  begin,
BidiIter  end,
basic_regex< BidiIter > const &  rex,
Subs const &  subs,
regex_constants::match_flag_type  flags = regex_constants::match_default 
)
inline
Parameters
beginThe beginning of the character range to search.
endThe end of the character range to search.
rexThe regex pattern to search for.
subsA range of integers designating sub-matches to be treated as tokens.
flagsOptional match flags, used to control how the expression is matched against the sequence. (See match_flag_type.)
Precondition
[begin,end) is a valid range.
subs is either an integer greater or equal to -1, or else an array or non-empty std::vector<> of such integers.

References boost::xpressive::basic_regex< BidiIter >::regex_id(), and boost::xpressive::detail::to_vector().

template<typename BidiIter>
template<typename Subs , typename LetExpr >
boost::xpressive::regex_token_iterator< BidiIter >::regex_token_iterator ( BidiIter  begin,
BidiIter  end,
basic_regex< BidiIter > const &  rex,
Subs const &  subs,
detail::let_< LetExpr > const &  args,
regex_constants::match_flag_type  flags = regex_constants::match_default 
)
inline
Parameters
beginThe beginning of the character range to search.
endThe end of the character range to search.
rexThe regex pattern to search for.
subsA range of integers designating sub-matches to be treated as tokens.
argsA let() expression with argument bindings for semantic actions.
flagsOptional match flags, used to control how the expression is matched against the sequence. (See match_flag_type.)
Precondition
[begin,end) is a valid range.
subs is either an integer greater or equal to -1, or else an array or non-empty std::vector<> of such integers.

References boost::xpressive::detail::bind_args(), boost::xpressive::basic_regex< BidiIter >::regex_id(), and boost::xpressive::detail::to_vector().

template<typename BidiIter>
boost::xpressive::regex_token_iterator< BidiIter >::regex_token_iterator ( regex_token_iterator< BidiIter > const &  that)
inline
Postcondition
*this == that

Member Function Documentation

template<typename BidiIter>
value_type const& boost::xpressive::regex_token_iterator< BidiIter >::operator* ( ) const
inline
template<typename BidiIter>
regex_token_iterator<BidiIter>& boost::xpressive::regex_token_iterator< BidiIter >::operator++ ( void  )
inline

If N == -1 then sets *this equal to the end of sequence iterator.

Otherwise if N+1 < subs.size(), then increments N and sets result equal to ((subs[N] == -1) ? value_type(what.prefix().str()) : value_type(what[subs[N]].str())). Otherwise if what.prefix().first != what[0].second and if the element match_prev_avail is not set in flags then sets it. Then locates the next match as if by calling regex_search(what[0].second, end, what, *pre, flags), with the following variation: in the event that the previous match found was of zero length (what[0].length() == 0) then attempts to find a non-zero length match starting at what[0].second, only if that fails and provided what[0].second != suffix().second does it look for a (possibly zero length) match starting from what[0].second + 1. If such a match is found then sets N equal to zero, and sets result equal to ((subs[N] == -1) ? value_type(what.prefix().str()) : value_type(what[subs[N]].str())). Otherwise if no further matches were found, then let last_end be the endpoint of the last match that was found. Then if last_end != end and subs[0] == -1 sets N equal to -1 and sets result equal to value_type(last_end, end). Otherwise sets *this equal to the end of sequence iterator.

template<typename BidiIter>
regex_token_iterator<BidiIter> boost::xpressive::regex_token_iterator< BidiIter >::operator++ ( int  )
inline
template<typename BidiIter>
value_type const* boost::xpressive::regex_token_iterator< BidiIter >::operator-> ( ) const
inline
template<typename BidiIter>
regex_token_iterator<BidiIter>& boost::xpressive::regex_token_iterator< BidiIter >::operator= ( regex_token_iterator< BidiIter > const &  that)
inline
Postcondition
*this == that

Friends And Related Function Documentation

template<typename BidiIter>
bool operator!= ( regex_token_iterator< BidiIter > const &  left,
regex_token_iterator< BidiIter > const &  right 
)
friend
template<typename BidiIter>
bool operator== ( regex_token_iterator< BidiIter > const &  left,
regex_token_iterator< BidiIter > const &  right 
)
friend

The documentation for this struct was generated from the following file: