Auxiliary class to specify white space character(s) in currect locale.
More...
#include <JWhiteSpacesFacet.hh>
|
typedef std::ctype< char > | ctype |
|
|
ctype::mask | mask_set [ctype::table_size] |
|
Auxiliary class to specify white space character(s) in currect locale.
Definition at line 35 of file JWhiteSpacesFacet.hh.
JLANG::JWhiteSpacesFacet::JWhiteSpacesFacet |
( |
const std::locale & |
loc, |
|
|
const std::string & |
ws |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
loc | current locale |
ws | white space character(s) |
Definition at line 46 of file JWhiteSpacesFacet.hh.
53 char buffer[table_size];
55 for (
unsigned int i = 0; i != table_size; ++i) {
59 use_facet<JMask::ctype>(loc).is(buffer, buffer + table_size,
mask_set);
61 for (
unsigned int i = 0; i != table_size; ++i) {
62 if (
mask_set[i] & JMask::ctype::space) {
67 for (string::const_iterator i = ws.begin(); i != ws.end(); ++i) {
68 mask_set[(int) *i] |= JMask::ctype::space;
ctype::mask mask_set[ctype::table_size]
Auxiliary class to ensure that the mask set is defined prior to the ctype<>() constructor call...
ctype::mask JLANG::JMask::mask_set[ctype::table_size] |
|
protectedinherited |
The documentation for this class was generated from the following file: