Encapsaulates a std::locale for use by the basic_regex<> class template.
More...
#include <xpressive_fwd.hpp>


Public Types | |
| typedef Char | char_type |
| typedef std::basic_string < char_type > | string_type |
| typedef std::locale | locale_type |
| typedef detail::umaskex_t | char_class_type |
| typedef regex_traits_version_2_tag | version_tag |
| typedef detail::cpp_regex_traits_base < Char > | base_type |
Public Member Functions | |
| cpp_regex_traits (locale_type const &loc=locale_type()) | |
| Initialize a cpp_regex_traits object to use the specified std::locale, or the global std::locale if none is specified. More... | |
| bool | operator== (cpp_regex_traits< char_type > const &that) const |
| Checks two cpp_regex_traits objects for equality. More... | |
| bool | operator!= (cpp_regex_traits< char_type > const &that) const |
| Checks two cpp_regex_traits objects for inequality. More... | |
| char_type | widen (char ch) const |
| Convert a char to a Char. More... | |
| char_type | translate_nocase (char_type ch) const |
| Converts a character to lower-case using the internally-stored std::locale. More... | |
| char_type | tolower (char_type ch) const |
| Converts a character to lower-case using the internally-stored std::locale. More... | |
| char_type | toupper (char_type ch) const |
| Converts a character to upper-case using the internally-stored std::locale. More... | |
| string_type | fold_case (char_type ch) const |
Returns a string_type containing all the characters that compare equal disregrarding case to the one passed in. More... | |
| bool | in_range_nocase (char_type first, char_type last, char_type ch) const |
| Checks to see if a character is within a character range, irregardless of case. More... | |
| template<typename FwdIter > | |
| string_type | transform (FwdIter, FwdIter) const |
| INTERNAL ONLY. More... | |
| template<typename FwdIter > | |
| string_type | transform_primary (FwdIter, FwdIter) const |
| Returns a sort key for the character sequence designated by the iterator range [F1, F2) such that if the character sequence [G1, G2) sorts before the character sequence [H1, H2) when character case is not considered then v.transform_primary(G1, G2) < v.transform_primary(H1, H2). More... | |
| template<typename FwdIter > | |
| string_type | lookup_collatename (FwdIter, FwdIter) const |
| Returns a sequence of characters that represents the collating element consisting of the character sequence designated by the iterator range [F1, F2). More... | |
| template<typename FwdIter > | |
| char_class_type | lookup_classname (FwdIter begin, FwdIter end, bool icase) const |
| For the character class name represented by the specified character sequence, return the corresponding bitmask representation. More... | |
| bool | isctype (char_type ch, char_class_type mask) const |
| Tests a character against a character class bitmask. More... | |
| int | value (char_type ch, int radix) const |
| Convert a digit character into the integer it represents. More... | |
| locale_type | imbue (locale_type loc) |
| Imbues *this with loc. More... | |
| locale_type | getloc () const |
| Returns the current std::locale used by *this. More... | |
| template<> | |
| unsigned char | hash (unsigned char ch) |
| template<> | |
| unsigned char | hash (char ch) |
| template<> | |
| unsigned char | hash (signed char ch) |
| template<> | |
| unsigned char | hash (wchar_t ch) |
Static Public Member Functions | |
| static unsigned char | hash (char_type ch) |
| Returns a hash value for a Char in the range [0, UCHAR_MAX]. More... | |
| static char_type | translate (char_type ch) |
| No-op. More... | |
| static bool | in_range (char_type first, char_type last, char_type ch) |
| Checks to see if a character is within a character range. More... | |
Protected Member Functions | |
| void | imbue (std::locale const &) |
Static Protected Member Functions | |
| static bool | is (std::ctype< Char > const &ct, Char ch, umaskex_t mask) |
Encapsaulates a std::locale for use by the basic_regex<> class template.
| typedef detail::cpp_regex_traits_base<Char> boost::xpressive::cpp_regex_traits< Char >::base_type |
| typedef detail::umaskex_t boost::xpressive::cpp_regex_traits< Char >::char_class_type |
| typedef Char boost::xpressive::cpp_regex_traits< Char >::char_type |
| typedef std::locale boost::xpressive::cpp_regex_traits< Char >::locale_type |
| typedef std::basic_string<char_type> boost::xpressive::cpp_regex_traits< Char >::string_type |
| typedef regex_traits_version_2_tag boost::xpressive::cpp_regex_traits< Char >::version_tag |
|
inline |
Initialize a cpp_regex_traits object to use the specified std::locale, or the global std::locale if none is specified.
References boost::xpressive::cpp_regex_traits< Char >::imbue().
|
inline |
Returns a string_type containing all the characters that compare equal disregrarding case to the one passed in.
This function can only be called if has_fold_case<cpp_regex_traits<Char> >::value is true.
| ch | The source character. |
string_type containing all chars which are equal to ch when disregarding case References BOOST_MPL_ASSERT.
|
inline |
Returns the current std::locale used by *this.
Referenced by boost::xpressive::cpp_regex_traits< Char >::value().
|
inlinestatic |
Returns a hash value for a Char in the range [0, UCHAR_MAX].
| ch | The source character. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotectedinherited |
Referenced by boost::xpressive::cpp_regex_traits< Char >::imbue().
|
inline |
Imbues *this with loc.
| loc | A std::locale. |
References BOOST_USE_FACET, and boost::xpressive::detail::cpp_regex_traits_base< Char >::imbue().
Referenced by boost::xpressive::cpp_regex_traits< Char >::cpp_regex_traits().
|
inlinestatic |
Checks to see if a character is within a character range.
| first | The bottom of the range, inclusive. |
| last | The top of the range, inclusive. |
| ch | The source character. |
References boost::last.
Referenced by boost::xpressive::cpp_regex_traits< Char >::in_range_nocase().
|
inline |
Checks to see if a character is within a character range, irregardless of case.
| first | The bottom of the range, inclusive. |
| last | The top of the range, inclusive. |
| ch | The source character. |
References boost::xpressive::cpp_regex_traits< Char >::in_range().
|
inlinestaticprotectedinherited |
References boost::spirit::ascii::xdigit.
Referenced by boost::xpressive::cpp_regex_traits< Char >::isctype().
|
inline |
Tests a character against a character class bitmask.
| ch | The character to test. |
| mask | The character class bitmask against which to test. |
References boost::xpressive::detail::cpp_regex_traits_base< Char >::is().
|
inline |
For the character class name represented by the specified character sequence, return the corresponding bitmask representation.
| begin | A forward iterator to the start of the character sequence representing the name of the character class. |
| end | The end of the character sequence. |
| icase | Specifies whether the returned bitmask should represent the case-insensitive version of the character class. |
References BOOST_ASSERT, boost::multiprecision::backends::i, boost::python::len(), boost::xpressive::detail::std_ctype_lower, boost::xpressive::detail::std_ctype_upper, and boost::xpressive::cpp_regex_traits< Char >::translate_nocase().
|
inline |
Returns a sequence of characters that represents the collating element consisting of the character sequence designated by the iterator range [F1, F2).
Returns an empty string if the character sequence is not a valid collating element.
References BOOST_ASSERT.
|
inline |
Checks two cpp_regex_traits objects for inequality.
|
inline |
Checks two cpp_regex_traits objects for equality.
|
inline |
Converts a character to lower-case using the internally-stored std::locale.
| ch | The source character. |
|
inline |
Converts a character to upper-case using the internally-stored std::locale.
| ch | The source character. |
|
inline |
INTERNAL ONLY.
Returns a sort key for the character sequence designated by the iterator range [F1, F2) such that if the character sequence [G1, G2) sorts before the character sequence [H1, H2) then v.transform(G1, G2) < v.transform(H1, H2).
References BOOST_ASSERT.
|
inline |
Returns a sort key for the character sequence designated by the iterator range [F1, F2) such that if the character sequence [G1, G2) sorts before the character sequence [H1, H2) when character case is not considered then v.transform_primary(G1, G2) < v.transform_primary(H1, H2).
References BOOST_ASSERT.
|
inlinestatic |
No-op.
| ch | The source character. |
|
inline |
Converts a character to lower-case using the internally-stored std::locale.
| ch | The source character. |
Referenced by boost::xpressive::cpp_regex_traits< Char >::lookup_classname().
|
inline |
Convert a digit character into the integer it represents.
| ch | The digit character. |
| radix | The radix to use for the conversion. |
References BOOST_ASSERT, boost::xpressive::cpp_regex_traits< Char >::getloc(), boost::spirit::x3::hex, boost::spirit::x3::oct, boost::xpressive::str, and boost::xpressive::val().
|
inline |
Convert a char to a Char.
| ch | The source character. |