...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::xpressive::null_regex_traits — stub regex_traits for non-char data
// In header: <boost/xpressive/xpressive_fwd.hpp> template<typename Elem> struct null_regex_traits { // construct/copy/destruct null_regex_traits(locale_type = locale_type()); // public member functions bool operator==(null_regex_traits< char_type > const &) const; bool operator !=(null_regex_traits< char_type > const &) const; char_type widen(char) const; // public static functions static unsigned char hash(char_type); static char_type translate(char_type); static char_type translate_nocase(char_type); static bool in_range(char_type, char_type, char_type); static bool in_range_nocase(char_type, char_type, char_type); template<typename FwdIter> static string_type transform(FwdIter, FwdIter); template<typename FwdIter> static string_type transform_primary(FwdIter, FwdIter); template<typename FwdIter> static string_type lookup_collatename(FwdIter, FwdIter); template<typename FwdIter> static char_class_type lookup_classname(FwdIter, FwdIter, bool); static bool isctype(char_type, char_class_type); static int value(char_type, int); static locale_type imbue(locale_type); static locale_type getloc(); };
null_regex_traits
public
construct/copy/destructnull_regex_traits(locale_type = locale_type());
Initialize a null_regex_traits
object.
null_regex_traits
public member functionsbool operator==(null_regex_traits< char_type > const & that) const;
Checks two null_regex_traits
objects for equality
Returns: |
true. |
bool operator !=(null_regex_traits< char_type > const & that) const;
Checks two null_regex_traits
objects for inequality
Returns: |
false. |
char_type widen(char ch) const;
Convert a char to a Elem
Parameters: |
|
||
Returns: |
Elem(ch). |
null_regex_traits
public static functionsstatic unsigned char hash(char_type ch);
Returns a hash value for a Elem in the range [0, UCHAR_MAX]
Parameters: |
|
||
Returns: |
a value between 0 and UCHAR_MAX, inclusive. |
static char_type translate(char_type ch);
No-op
Parameters: |
|
||
Returns: |
ch |
static char_type translate_nocase(char_type ch);
No-op
Parameters: |
|
||
Returns: |
ch |
static bool in_range(char_type first, char_type last, char_type ch);
Checks to see if a character is within a character range.
Parameters: |
|
||||||
Returns: |
first <= ch && ch <= last. |
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.
Note | |
---|---|
Since the |
Parameters: |
|
||||||
Returns: |
first <= ch && ch <= last. |
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).
Note | |
---|---|
Not currently used |
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).
Note | |
---|---|
Not currently used |
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). Returns an empty string if the character sequence is not a valid collating element.
Note | |
---|---|
Not currently used |
template<typename FwdIter> static char_class_type lookup_classname(FwdIter begin, FwdIter end, bool icase);
The null_regex_traits
does not have character classifications, so lookup_classname() is unused.
Parameters: |
|
||||||
Returns: |
static_cast<char_class_type>(0) |
static bool isctype(char_type ch, char_class_type mask);
The null_regex_traits
does not have character classifications, so isctype() is unused.
Parameters: |
|
||||
Returns: |
false |
static int value(char_type ch, int radix);
The null_regex_traits
recognizes no elements as digits, so value() is unused.
Parameters: |
|
||||
Returns: |
-1 |
static locale_type imbue(locale_type loc);
Not used
Parameters: |
|
||
Returns: |
loc |
static locale_type getloc();
Returns locale_type().
Returns: |
locale_type() |