CppCMS
Public Types | Public Member Functions | Public Attributes
booster::sub_match< Iterator > Class Template Reference

This class represents a single captures subexpression. More...

#include <booster/booster/regex_match.h>

List of all members.

Public Types

typedef Iterator iterator
typedef std::iterator_traits
< Iterator >::value_type 
value_type
typedef std::iterator_traits
< Iterator >::difference_type 
difference_type
typedef std::basic_string
< value_type > 
string_type
typedef std::pair< Iterator,
Iterator > 
pair_type

Public Member Functions

difference_type length () const
 operator string_type () const
string_type str () const
int compare (sub_match const &other) const
int compare (string_type const &other) const
int compare (value_type const *s) const
 sub_match ()

Public Attributes

bool matched

Detailed Description

template<typename Iterator>
class booster::sub_match< Iterator >

This class represents a single captures subexpression.

The subexpressions captured text is found between [first,second).


Member Typedef Documentation

template<typename Iterator >
typedef std::basic_string<value_type> booster::sub_match< Iterator >::string_type

The string type that this expression can be converted into, generally std::string.


Constructor & Destructor Documentation

template<typename Iterator >
booster::sub_match< Iterator >::sub_match ( ) [inline]

Default not-matched subexpressions.


Member Function Documentation

template<typename Iterator >
int booster::sub_match< Iterator >::compare ( sub_match< Iterator > const &  other) const [inline]

Compare two subexpressions. Same as str().compare(other.str())

References booster::sub_match< Iterator >::str().

template<typename Iterator >
int booster::sub_match< Iterator >::compare ( string_type const &  other) const [inline]

Compare two subexpressions. Same as str().compare(other)

References booster::sub_match< Iterator >::str().

template<typename Iterator >
int booster::sub_match< Iterator >::compare ( value_type const *  s) const [inline]

Compare two subexpressions. Same as str().compare(s)

References booster::sub_match< Iterator >::str().

template<typename Iterator >
difference_type booster::sub_match< Iterator >::length ( ) const [inline]

The length of captured subexpression, 0 if matched==false.

References booster::sub_match< Iterator >::matched.

template<typename Iterator >
booster::sub_match< Iterator >::operator string_type ( ) const [inline]

Explicit conversion operator to string

References booster::sub_match< Iterator >::str().

template<typename Iterator >
string_type booster::sub_match< Iterator >::str ( ) const [inline]

Convert the subexpression to string. If matched is false, return empty string.

References booster::sub_match< Iterator >::matched.

Referenced by booster::sub_match< Iterator >::compare(), and booster::sub_match< Iterator >::operator string_type().


Member Data Documentation

template<typename Iterator >
bool booster::sub_match< Iterator >::matched

This flag is true if the expression was matched, false otherwise. if matched is false then there is no guarantees that first or second are valid iterators.

Referenced by booster::sub_match< Iterator >::length(), booster::match_results< Iterator >::operator[](), booster::match_results< Iterator >::prefix(), booster::sub_match< Iterator >::str(), and booster::match_results< Iterator >::suffix().


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