ReactOS 0.4.15-dev-7693-gd0e2924
ctype< char > Class Reference

#include <_ctype.h>

Inheritance diagram for ctype< char >:
Collaboration diagram for ctype< char >:

Classes

struct  _Is_mask
 

Public Types

typedef char char_type
 
- Public Types inherited from ctype_base
enum  mask {
  space = _Locale_SPACE , print = _Locale_PRINT , cntrl = _Locale_CNTRL , upper = _Locale_UPPER ,
  lower = _Locale_LOWER , alpha = _Locale_ALPHA , digit = _Locale_DIGIT , punct = _Locale_PUNCT ,
  xdigit = _Locale_XDIGIT , alnum = alpha | digit , graph = alnum | punct
}
 

Public Member Functions

 ctype (const mask *__tab=0, bool __del=false, size_t __refs=0)
 
bool is (mask __m, char __c) const
 
const charis (const char *__low, const char *__high, mask *__vec) const
 
const charscan_is (mask __m, const char *__low, const char *__high) const
 
const charscan_not (mask __m, const char *__low, const char *__high) const
 
char() toupper (char __c) const
 
const char *() toupper (char *__low, const char *__high) const
 
char() tolower (char __c) const
 
const char *() tolower (char *__low, const char *__high) const
 
char widen (char __c) const
 
const charwiden (const char *__low, const char *__high, char *__to) const
 
char narrow (char __c, char __dfault) const
 
const charnarrow (const char *__low, const char *__high, char __dfault, char *__to) const
 
 _STLP_STATIC_CONSTANT (size_t, table_size=256)
 

Static Public Attributes

static _STLP_STATIC_DECLSPEC locale::id id = { 2 }
 

Protected Member Functions

const masktable () const _STLP_NOTHROW
 
 ~ctype ()
 
virtual char do_toupper (char __c) const
 
virtual char do_tolower (char __c) const
 
virtual const chardo_toupper (char *__low, const char *__high) const
 
virtual const chardo_tolower (char *__low, const char *__high) const
 
virtual char do_widen (char __c) const
 
virtual const chardo_widen (const char *__low, const char *__high, char *__to) const
 
virtual char do_narrow (char __c, char) const
 
virtual const chardo_narrow (const char *__low, const char *__high, char, char *__to) const
 
- Protected Member Functions inherited from locale::facet
 facet (size_t __init_count=0)
 
virtual ~facet ()
 
- Protected Member Functions inherited from _Refcount_Base
 _Refcount_Base (__stl_atomic_t __n)
 
__stl_atomic_t _M_incr ()
 
__stl_atomic_t _M_decr ()
 

Static Protected Member Functions

static const mask *_STLP_CALL classic_table () _STLP_NOTHROW
 

Protected Attributes

const mask_M_ctype_table
 

Private Attributes

bool _M_delete
 

Friends

class ctype< wchar_t >
 

Detailed Description

Definition at line 64 of file _ctype.h.

Member Typedef Documentation

◆ char_type

typedef char ctype< char >::char_type

Definition at line 75 of file _ctype.h.

Constructor & Destructor Documentation

◆ ctype()

ctype< char >::ctype ( const mask __tab = 0,
bool  __del = false,
size_t  __refs = 0 
)
explicit

◆ ~ctype()

ctype< char >::~ctype ( )
protected

Member Function Documentation

◆ _STLP_STATIC_CONSTANT()

ctype< char >::_STLP_STATIC_CONSTANT ( size_t  ,
table_size  = 256 
)

◆ classic_table()

const ctype_base::mask * ctype< char >::classic_table ( )
staticprotected

Definition at line 43 of file ctype.cpp.

43 {
44 /* Ctype table for the ASCII character set. */
45 static const ctype_base::mask _S_classic_table[table_size] = {
46 cntrl /* null */,
47 cntrl /* ^A */,
48 cntrl /* ^B */,
49 cntrl /* ^C */,
50 cntrl /* ^D */,
51 cntrl /* ^E */,
52 cntrl /* ^F */,
53 cntrl /* ^G */,
54 cntrl /* ^H */,
55 ctype_base::mask(space | cntrl) /* tab */,
56 ctype_base::mask(space | cntrl) /* LF */,
57 ctype_base::mask(space | cntrl) /* ^K */,
58 ctype_base::mask(space | cntrl) /* FF */,
59 ctype_base::mask(space | cntrl) /* ^M */,
60 cntrl /* ^N */,
61 cntrl /* ^O */,
62 cntrl /* ^P */,
63 cntrl /* ^Q */,
64 cntrl /* ^R */,
65 cntrl /* ^S */,
66 cntrl /* ^T */,
67 cntrl /* ^U */,
68 cntrl /* ^V */,
69 cntrl /* ^W */,
70 cntrl /* ^X */,
71 cntrl /* ^Y */,
72 cntrl /* ^Z */,
73 cntrl /* esc */,
74 cntrl /* ^\ */,
75 cntrl /* ^] */,
76 cntrl /* ^^ */,
77 cntrl /* ^_ */,
79 ctype_base::mask(punct | print) /* ! */,
80 ctype_base::mask(punct | print) /* " */,
81 ctype_base::mask(punct | print) /* # */,
82 ctype_base::mask(punct | print) /* $ */,
83 ctype_base::mask(punct | print) /* % */,
84 ctype_base::mask(punct | print) /* & */,
85 ctype_base::mask(punct | print) /* ' */,
86 ctype_base::mask(punct | print) /* ( */,
87 ctype_base::mask(punct | print) /* ) */,
88 ctype_base::mask(punct | print) /* * */,
89 ctype_base::mask(punct | print) /* + */,
90 ctype_base::mask(punct | print) /* , */,
91 ctype_base::mask(punct | print) /* - */,
92 ctype_base::mask(punct | print) /* . */,
93 ctype_base::mask(punct | print) /* / */,
100 ctype_base::mask(digit | print | xdigit) /* 6 */,
101 ctype_base::mask(digit | print | xdigit) /* 7 */,
102 ctype_base::mask(digit | print | xdigit) /* 8 */,
103 ctype_base::mask(digit | print | xdigit) /* 9 */,
104 ctype_base::mask(punct | print) /* : */,
105 ctype_base::mask(punct | print) /* ; */,
106 ctype_base::mask(punct | print) /* < */,
107 ctype_base::mask(punct | print) /* = */,
108 ctype_base::mask(punct | print) /* > */,
109 ctype_base::mask(punct | print) /* ? */,
110 ctype_base::mask(punct | print) /* ! */,
111 ctype_base::mask(alpha | print | upper | xdigit) /* A */,
112 ctype_base::mask(alpha | print | upper | xdigit) /* B */,
113 ctype_base::mask(alpha | print | upper | xdigit) /* C */,
114 ctype_base::mask(alpha | print | upper | xdigit) /* D */,
115 ctype_base::mask(alpha | print | upper | xdigit) /* E */,
116 ctype_base::mask(alpha | print | upper | xdigit) /* F */,
117 ctype_base::mask(alpha | print | upper) /* G */,
118 ctype_base::mask(alpha | print | upper) /* H */,
119 ctype_base::mask(alpha | print | upper) /* I */,
120 ctype_base::mask(alpha | print | upper) /* J */,
121 ctype_base::mask(alpha | print | upper) /* K */,
122 ctype_base::mask(alpha | print | upper) /* L */,
123 ctype_base::mask(alpha | print | upper) /* M */,
124 ctype_base::mask(alpha | print | upper) /* N */,
125 ctype_base::mask(alpha | print | upper) /* O */,
126 ctype_base::mask(alpha | print | upper) /* P */,
127 ctype_base::mask(alpha | print | upper) /* Q */,
128 ctype_base::mask(alpha | print | upper) /* R */,
129 ctype_base::mask(alpha | print | upper) /* S */,
130 ctype_base::mask(alpha | print | upper) /* T */,
131 ctype_base::mask(alpha | print | upper) /* U */,
132 ctype_base::mask(alpha | print | upper) /* V */,
133 ctype_base::mask(alpha | print | upper) /* W */,
134 ctype_base::mask(alpha | print | upper) /* X */,
135 ctype_base::mask(alpha | print | upper) /* Y */,
136 ctype_base::mask(alpha | print | upper) /* Z */,
137 ctype_base::mask(punct | print) /* [ */,
138 ctype_base::mask(punct | print) /* \ */,
139 ctype_base::mask(punct | print) /* ] */,
140 ctype_base::mask(punct | print) /* ^ */,
141 ctype_base::mask(punct | print) /* _ */,
142 ctype_base::mask(punct | print) /* ` */,
143 ctype_base::mask(alpha | print | lower | xdigit) /* a */,
144 ctype_base::mask(alpha | print | lower | xdigit) /* b */,
145 ctype_base::mask(alpha | print | lower | xdigit) /* c */,
146 ctype_base::mask(alpha | print | lower | xdigit) /* d */,
147 ctype_base::mask(alpha | print | lower | xdigit) /* e */,
148 ctype_base::mask(alpha | print | lower | xdigit) /* f */,
149 ctype_base::mask(alpha | print | lower) /* g */,
150 ctype_base::mask(alpha | print | lower) /* h */,
151 ctype_base::mask(alpha | print | lower) /* i */,
152 ctype_base::mask(alpha | print | lower) /* j */,
153 ctype_base::mask(alpha | print | lower) /* k */,
154 ctype_base::mask(alpha | print | lower) /* l */,
155 ctype_base::mask(alpha | print | lower) /* m */,
156 ctype_base::mask(alpha | print | lower) /* n */,
157 ctype_base::mask(alpha | print | lower) /* o */,
158 ctype_base::mask(alpha | print | lower) /* p */,
159 ctype_base::mask(alpha | print | lower) /* q */,
160 ctype_base::mask(alpha | print | lower) /* r */,
161 ctype_base::mask(alpha | print | lower) /* s */,
162 ctype_base::mask(alpha | print | lower) /* t */,
163 ctype_base::mask(alpha | print | lower) /* u */,
164 ctype_base::mask(alpha | print | lower) /* v */,
165 ctype_base::mask(alpha | print | lower) /* w */,
166 ctype_base::mask(alpha | print | lower) /* x */,
167 ctype_base::mask(alpha | print | lower) /* y */,
168 ctype_base::mask(alpha | print | lower) /* z */,
169 ctype_base::mask(punct | print) /* { */,
170 ctype_base::mask(punct | print) /* | */,
171 ctype_base::mask(punct | print) /* } */,
172 ctype_base::mask(punct | print) /* ~ */,
173 cntrl /* del (0x7f)*/,
174 /* ASCII is a 7-bit code, so everything else is non-ASCII */
191 };
192 return _S_classic_table;
193}
@ lower
Definition: _ctype.h:46
@ cntrl
Definition: _ctype.h:44
@ xdigit
Definition: _ctype.h:50
@ print
Definition: _ctype.h:43
@ upper
Definition: _ctype.h:45
@ punct
Definition: _ctype.h:49
@ digit
Definition: _ctype.h:48
GLclampf GLclampf GLclampf alpha
Definition: gl.h:1740
LOCAL int table_size
Definition: write.c:65

◆ do_narrow() [1/2]

virtual char ctype< char >::do_narrow ( char  __c,
char   
) const
protectedvirtual

◆ do_narrow() [2/2]

virtual const char * ctype< char >::do_narrow ( const char __low,
const char __high,
char  ,
char __to 
) const
protectedvirtual

◆ do_tolower() [1/2]

virtual const char * ctype< char >::do_tolower ( char __low,
const char __high 
) const
protectedvirtual

Reimplemented in ctype_byname< char >.

◆ do_tolower() [2/2]

virtual char ctype< char >::do_tolower ( char  __c) const
protectedvirtual

Reimplemented in ctype_byname< char >.

◆ do_toupper() [1/2]

virtual const char * ctype< char >::do_toupper ( char __low,
const char __high 
) const
protectedvirtual

Reimplemented in ctype_byname< char >.

◆ do_toupper() [2/2]

virtual char ctype< char >::do_toupper ( char  __c) const
protectedvirtual

Reimplemented in ctype_byname< char >.

◆ do_widen() [1/2]

virtual char ctype< char >::do_widen ( char  __c) const
protectedvirtual

◆ do_widen() [2/2]

virtual const char * ctype< char >::do_widen ( const char __low,
const char __high,
char __to 
) const
protectedvirtual

◆ is() [1/2]

const char * ctype< char >::is ( const char __low,
const char __high,
mask __vec 
) const
inline

Definition at line 81 of file _ctype.h.

81 {
82 for (const char* __p = __low;__p != __high; ++__p, ++__vec) {
83 *__vec = _M_ctype_table[(unsigned char)*__p];
84 }
85 return __high;
86 }
const mask * _M_ctype_table
Definition: _ctype.h:141
unsigned char
Definition: typeof.h:29

◆ is() [2/2]

bool ctype< char >::is ( mask  __m,
char  __c 
) const
inline

Definition at line 78 of file _ctype.h.

79 { return ((*(_M_ctype_table+(unsigned char)__c)) & __m) != 0; }
#define __c
Definition: schilyio.h:209

◆ narrow() [1/2]

char ctype< char >::narrow ( char  __c,
char  __dfault 
) const
inline

Definition at line 106 of file _ctype.h.

106 {
107 return do_narrow(__c, __dfault);
108 }
virtual char do_narrow(char __c, char) const

◆ narrow() [2/2]

const char * ctype< char >::narrow ( const char __low,
const char __high,
char  __dfault,
char __to 
) const
inline

Definition at line 109 of file _ctype.h.

110 {
111 return do_narrow(__low, __high, __dfault, __to);
112 }

◆ scan_is()

const char * ctype< char >::scan_is ( mask  __m,
const char __low,
const char __high 
) const

◆ scan_not()

const char * ctype< char >::scan_not ( mask  __m,
const char __low,
const char __high 
) const

◆ table()

const mask * ctype< char >::table ( ) const
inlineprotected

Definition at line 118 of file _ctype.h.

118{ return _M_ctype_table; }

◆ tolower() [1/2]

const char *() ctype< char >::tolower ( char __low,
const char __high 
) const
inline

Definition at line 97 of file _ctype.h.

97 {
98 return do_tolower(__low, __high);
99 }
virtual char do_tolower(char __c) const

◆ tolower() [2/2]

char() ctype< char >::tolower ( char  __c) const
inline

Definition at line 96 of file _ctype.h.

96{ return do_tolower(__c); }

◆ toupper() [1/2]

const char *() ctype< char >::toupper ( char __low,
const char __high 
) const
inline

Definition at line 92 of file _ctype.h.

92 {
93 return do_toupper(__low, __high);
94 }
virtual char do_toupper(char __c) const

◆ toupper() [2/2]

char() ctype< char >::toupper ( char  __c) const
inline

Definition at line 91 of file _ctype.h.

91{ return do_toupper(__c); }

◆ widen() [1/2]

char ctype< char >::widen ( char  __c) const
inline

Definition at line 101 of file _ctype.h.

101{ return do_widen(__c); }
virtual char do_widen(char __c) const

◆ widen() [2/2]

const char * ctype< char >::widen ( const char __low,
const char __high,
char __to 
) const
inline

Definition at line 102 of file _ctype.h.

102 {
103 return do_widen(__low, __high, __to);
104 }

Friends And Related Function Documentation

◆ ctype< wchar_t >

friend class ctype< wchar_t >
friend

Definition at line 273 of file _ctype.h.

Member Data Documentation

◆ _M_ctype_table

const mask* ctype< char >::_M_ctype_table
protected

Definition at line 141 of file _ctype.h.

◆ _M_delete

bool ctype< char >::_M_delete
private

Definition at line 143 of file _ctype.h.

◆ id

locale::id ctype< char >::id = { 2 }
static

Definition at line 114 of file _ctype.h.


The documentation for this class was generated from the following files: