![]() |
Home | Libraries | People | FAQ | More |
boost::xpressive::basic_regex — Class template basic_regex<> is a class for holding a compiled regular expression.
template<typename BidiIter> struct basic_regex { // types typedef BidiIter iterator_type; typedef iterator_value< BidiIter >::type char_type; typedef std::basic_string< char_type > string_type; typedef regex_constants::syntax_option_type flag_type; // construct/copy/destruct basic_regex(); basic_regex(basic_regex< BidiIter > const &); template<typename Xpr> basic_regex(Xpr const &); basic_regex& operator=(basic_regex< BidiIter > const &); template<typename Xpr> basic_regex& operator=(Xpr const &); // public member functions std::size_t mark_count() const; regex_id_type regex_id() const; void swap(basic_regex< BidiIter > &) ; // public static functions static basic_regex< BidiIter > compile(string_type const &, flag_type = regex_constants::ECMAScript) ; };
basic_regex
construct/copy/destructbasic_regex();
Postconditions: |
regex_id() == 0 mark_count() == 0 |
basic_regex(basic_regex< BidiIter > const & that);
Parameters: |
|
||
Postconditions: |
regex_id() == that.regex_id() mark_count() == that.mark_count() |
template<typename Xpr> basic_regex(Xpr const & xpr);
Construct from a static regular expression.
Parameters: |
|
||
Requires: | Xpr is the type of a static regular expression. |
||
Postconditions: |
regex_id() != 0 mark_count() >= 0 |
basic_regex& operator=(basic_regex< BidiIter > const & that);
Parameters: |
|
||
Postconditions: |
regex_id() == that.regex_id() mark_count() == that.mark_count() |
||
Returns: | *this |
template<typename Xpr> basic_regex& operator=(Xpr const & xpr);
Construct from a static regular expression.
Parameters: |
|
||
Requires: | Xpr is the type of a static regular expression. |
||
Postconditions: |
regex_id() != 0 mark_count() >= 0 |
||
Returns: | *this |
||
Throws: | std::bad_alloc on out of memory |
basic_regex
public member functionsstd::size_t mark_count() const;
Returns the count of capturing sub-expressions in this regular expression
regex_id_type regex_id() const;
Returns a token which uniquely identifies this regular expression.
void swap(basic_regex< BidiIter > & that) ;
Swaps the contents of this basic_regex object with another.
Parameters: |
|
||
Throws: | Will not throw. | ||
Notes: | This is a shallow swap that does not do reference tracking. If you embed a basic_regex object by reference in another regular expression and then swap its contents with another basic_regex object, the change will not be visible to the enclosing regular expression. It is done this way to ensure that swap() cannot throw. |
basic_regex
public static functionsstatic basic_regex< BidiIter > compile(string_type const & str, flag_type flags = regex_constants::ECMAScript) ;
Factory method for building a regex object from a string. Equivalent to regex_compiler< BidiIter >().compile(str, flags);
Parameters: |
|
Copyright © 2003, 2004 Eric Niebler |