Class template sub_match
denotes the sequence of characters matched by a particular marked sub-expression.
More...
#include <xpressive_fwd.hpp>
Public Types | |
typedef iterator_value < BidiIter >::type | value_type |
typedef iterator_difference < BidiIter >::type | difference_type |
typedef detail::string_type < value_type >::type | string_type |
typedef BidiIter | iterator |
Public Member Functions | |
sub_match () | |
sub_match (BidiIter first, BidiIter second, bool matched_=false) | |
string_type | str () const |
operator string_type () const | |
difference_type | length () const |
operator bool_type () const | |
bool | operator! () const |
int | compare (string_type const &str) const |
Performs a lexicographic string comparison. More... | |
int | compare (sub_match const &sub) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
int | compare (value_type const *ptr) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
Public Attributes | |
bool | matched |
true if this sub-match participated in the full match. More... | |
Class template sub_match
denotes the sequence of characters matched by a particular marked sub-expression.
When the marked sub-expression denoted by an object of type sub_match<>
participated in a regular expression match then member matched
evaluates to true
, and members first
and second
denote the range of characters [first,second)
which formed that match. Otherwise matched
is false
, and members first
and second
contained undefined values.
If an object of type sub_match<>
represents sub-expression 0 - that is to say the whole match - then member matched
is always true
, unless a partial match was obtained as a result of the flag match_partial
being passed to a regular expression algorithm, in which case member matched
is false
, and members first
and second
represent the character range that formed the partial match.
typedef iterator_difference<BidiIter>::type boost::xpressive::sub_match< BidiIter >::difference_type |
typedef BidiIter boost::xpressive::sub_match< BidiIter >::iterator |
typedef detail::string_type<value_type>::type boost::xpressive::sub_match< BidiIter >::string_type |
typedef iterator_value<BidiIter>::type boost::xpressive::sub_match< BidiIter >::value_type |
|
inline |
|
inline |
|
inline |
Performs a lexicographic string comparison.
str | the string against which to compare |
(*this).str().compare(str)
References boost::xpressive::sub_match< BidiIter >::str().
Referenced by boost::xpressive::operator!=(), boost::xpressive::operator<(), boost::xpressive::operator<=(), boost::xpressive::operator==(), boost::xpressive::operator>(), and boost::xpressive::operator>=().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References boost::xpressive::sub_match< BidiIter >::str().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References boost::xpressive::sub_match< BidiIter >::str().
|
inline |
|
inline |
References boost::xpressive::sub_match< BidiIter >::matched.
|
inline |
|
inline |
References boost::xpressive::sub_match< BidiIter >::matched.
|
inline |
References boost::xpressive::first, boost::xpressive::sub_match< BidiIter >::matched, and boost::xpressive::second.
Referenced by boost::xpressive::sub_match< BidiIter >::compare(), boost::xpressive::operator!=(), boost::xpressive::operator+(), boost::xpressive::operator<(), boost::xpressive::operator<=(), boost::xpressive::operator==(), boost::xpressive::operator>(), and boost::xpressive::operator>=().
bool boost::xpressive::sub_match< BidiIter >::matched |
true if this sub-match participated in the full match.
Referenced by boost::xpressive::sub_match< BidiIter >::length(), boost::xpressive::sub_match< BidiIter >::operator bool_type(), boost::xpressive::sub_match< BidiIter >::operator string_type(), boost::xpressive::sub_match< BidiIter >::operator!(), boost::xpressive::op::as< T >::operator()(), and boost::xpressive::sub_match< BidiIter >::str().