Encapsaulates the standard C locale functions 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 detail::empty_locale | locale_type |
| typedef detail::char_class_impl< Char > ::char_class_type | char_class_type |
| typedef regex_traits_version_2_tag | version_tag |
| typedef detail::c_regex_traits_base < Char > | base_type |
Public Member Functions | |
| c_regex_traits (locale_type const &loc=locale_type()) | |
| Initialize a c_regex_traits object to use the global C locale. More... | |
| bool | operator== (c_regex_traits< char_type > const &) const |
| Checks two c_regex_traits objects for equality. More... | |
| bool | operator!= (c_regex_traits< char_type > const &) const |
| Checks two c_regex_traits objects for inequality. 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... | |
| locale_type | imbue (locale_type loc) |
| No-op. More... | |
| template<> | |
| char | widen (char ch) |
| template<> | |
| wchar_t | widen (char ch) |
| template<> | |
| unsigned char | hash (char ch) |
| template<> | |
| unsigned char | hash (wchar_t ch) |
| template<> | |
| int | value (char ch, int radix) |
| template<> | |
| int | value (wchar_t ch, int radix) |
Static Public Member Functions | |
| static char_type | widen (char ch) |
| Convert a char to a Char. More... | |
| 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 char_type | translate_nocase (char_type ch) |
| Converts a character to lower-case using the current global C locale. More... | |
| static char_type | tolower (char_type ch) |
| Converts a character to lower-case using the current global C locale. More... | |
| static char_type | toupper (char_type ch) |
| Converts a character to upper-case using the current global C locale. 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... | |
| static bool | in_range_nocase (char_type first, char_type last, char_type ch) |
| Checks to see if a character is within a character range, irregardless of case. More... | |
| template<typename FwdIter > | |
| static string_type | transform (FwdIter begin, FwdIter end) |
| 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). More... | |
| template<typename FwdIter > | |
| static string_type | transform_primary (FwdIter begin, FwdIter end) |
| 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 > | |
| static string_type | lookup_collatename (FwdIter begin, FwdIter end) |
| 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 > | |
| static char_class_type | lookup_classname (FwdIter begin, FwdIter end, bool icase) |
| For the character class name represented by the specified character sequence, return the corresponding bitmask representation. More... | |
| static bool | isctype (char_type ch, char_class_type mask) |
| Tests a character against a character class bitmask. More... | |
| static int | value (char_type ch, int radix) |
| Convert a digit character into the integer it represents. More... | |
| static locale_type | getloc () |
| No-op. More... | |
Protected Member Functions | |
| void | imbue (Traits const &tr) |
Encapsaulates the standard C locale functions for use by the basic_regex<> class template.
| typedef detail::c_regex_traits_base<Char> boost::xpressive::c_regex_traits< Char >::base_type |
| typedef detail::char_class_impl<Char>::char_class_type boost::xpressive::c_regex_traits< Char >::char_class_type |
| typedef Char boost::xpressive::c_regex_traits< Char >::char_type |
| typedef detail::empty_locale boost::xpressive::c_regex_traits< Char >::locale_type |
| typedef std::basic_string<char_type> boost::xpressive::c_regex_traits< Char >::string_type |
| typedef regex_traits_version_2_tag boost::xpressive::c_regex_traits< Char >::version_tag |
|
inline |
Initialize a c_regex_traits object to use the global C locale.
References boost::xpressive::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<c_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, boost::xpressive::detail::c_tolower(), and boost::xpressive::detail::c_toupper().
|
inlinestatic |
No-op.
|
inlinestatic |
Returns a hash value for a Char in the range [0, UCHAR_MAX].
| ch | The source character. |
|
inline |
|
inline |
|
inlineprotectedinherited |
|
inline |
No-op.
References boost::iostreams::imbue().
|
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::c_regex_traits< Char >::in_range_nocase().
|
inlinestatic |
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::detail::c_tolower(), boost::xpressive::detail::c_toupper(), and boost::xpressive::c_regex_traits< Char >::in_range().
|
inlinestatic |
Tests a character against a character class bitmask.
| ch | The character to test. |
| mask | The character class bitmask against which to test. |
|
inlinestatic |
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::xpressive::lookup_classname().
|
inlinestatic |
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 c_regex_traits objects for inequality.
|
inline |
Checks two c_regex_traits objects for equality.
|
inlinestatic |
Converts a character to lower-case using the current global C locale.
| ch | The source character. |
References boost::xpressive::detail::c_tolower().
|
inlinestatic |
Converts a character to upper-case using the current global C locale.
| ch | The source character. |
References boost::xpressive::detail::c_toupper().
|
inlinestatic |
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.
|
inlinestatic |
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. |
|
inlinestatic |
Converts a character to lower-case using the current global C locale.
| ch | The source character. |
References boost::xpressive::detail::c_tolower().
|
static |
Convert a digit character into the integer it represents.
| ch | The digit character. |
| radix | The radix to use for the conversion. |
|
inline |
References boost::asio::begin, BOOST_ASSERT, boost::end, and boost::xpressive::val().
|
inline |
|
static |
Convert a char to a Char.
| ch | The source character. |
|
inline |
|
inline |