Class template regex_compiler is a factory for building basic_regex objects from a string. More...
#include <xpressive_fwd.hpp>
Public Types | |
typedef BidiIter | iterator_type |
typedef iterator_value < BidiIter >::type | char_type |
typedef regex_constants::syntax_option_type | flag_type |
typedef RegexTraits | traits_type |
typedef traits_type::string_type | string_type |
typedef traits_type::locale_type | locale_type |
typedef traits_type::char_class_type | char_class_type |
Public Member Functions | |
regex_compiler (RegexTraits const &traits=RegexTraits()) | |
locale_type | imbue (locale_type loc) |
Specify the locale to be used by a regex_compiler. More... | |
locale_type | getloc () const |
Get the locale used by a regex_compiler. More... | |
template<typename InputIter > | |
basic_regex< BidiIter > | compile (InputIter begin, InputIter end, flag_type flags=regex_constants::ECMAScript) |
Builds a basic_regex object from a range of characters. More... | |
template<typename InputRange > | |
disable_if< is_pointer < InputRange >, basic_regex < BidiIter > >::type | compile (InputRange const &pat, flag_type flags=regex_constants::ECMAScript) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
basic_regex< BidiIter > | compile (char_type const *begin, flag_type flags=regex_constants::ECMAScript) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
basic_regex< BidiIter > | compile (char_type const *begin, std::size_t size, flag_type flags) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
basic_regex< BidiIter > & | operator[] (string_type const &name) |
Return a reference to the named regular expression. More... | |
basic_regex< BidiIter > const & | operator[] (string_type const &name) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
Class template regex_compiler is a factory for building basic_regex objects from a string.
Class template regex_compiler is used to construct a basic_regex object from a string. The string should contain a valid regular expression. You can imbue a regex_compiler object with a locale, after which all basic_regex objects created with that regex_compiler object will use that locale. After creating a regex_compiler object, and optionally imbueing it with a locale, you can call the compile() method to construct a basic_regex object, passing it the string representing the regular expression. You can call compile() multiple times on the same regex_compiler object. Two basic_regex objects compiled from the same string will have different regex_id's.
typedef traits_type::char_class_type boost::xpressive::regex_compiler< BidiIter, RegexTraits, CompilerTraits >::char_class_type |
typedef iterator_value<BidiIter>::type boost::xpressive::regex_compiler< BidiIter, RegexTraits, CompilerTraits >::char_type |
typedef regex_constants::syntax_option_type boost::xpressive::regex_compiler< BidiIter, RegexTraits, CompilerTraits >::flag_type |
typedef BidiIter boost::xpressive::regex_compiler< BidiIter, RegexTraits, CompilerTraits >::iterator_type |
typedef traits_type::locale_type boost::xpressive::regex_compiler< BidiIter, RegexTraits, CompilerTraits >::locale_type |
typedef traits_type::string_type boost::xpressive::regex_compiler< BidiIter, RegexTraits, CompilerTraits >::string_type |
typedef RegexTraits boost::xpressive::regex_compiler< BidiIter, RegexTraits, CompilerTraits >::traits_type |
|
inlineexplicit |
References boost::xpressive::lookup_classname().
|
inline |
Builds a basic_regex object from a range of characters.
begin | The beginning of a range of characters representing the regular expression to compile. |
end | The end of a range of characters representing the regular expression to compile. |
flags | Optional bitmask that determines how the pat string is interpreted. (See syntax_option_type.) |
regex_error | when the range of characters has invalid regular expression syntax. |
References boost::detail::type.
Referenced by boost::xpressive::regex_compiler< BidiIter, RegexTraits, CompilerTraits >::compile().
|
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::asio::begin, boost::xpressive::regex_compiler< BidiIter, RegexTraits, CompilerTraits >::compile(), and boost::end.
|
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_ASSERT, boost::xpressive::regex_compiler< BidiIter, RegexTraits, CompilerTraits >::compile(), and boost::end.
|
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_ASSERT, boost::xpressive::regex_compiler< BidiIter, RegexTraits, CompilerTraits >::compile(), boost::end, and boost::size().
|
inline |
Get the locale used by a regex_compiler.
|
inline |
Specify the locale to be used by a regex_compiler.
loc | The locale that this regex_compiler should use. |
References boost::xpressive::lookup_classname().
|
inline |
Return a reference to the named regular expression.
If no such named regular expression exists, create a new regular expression and return a reference to it.
name | A std::string containing the name of the regular expression. |
bad_alloc | on allocation failure. |
References BOOST_ASSERT, and boost::iostreams::gzip::flags::name.
|
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_ASSERT, and boost::iostreams::gzip::flags::name.