|
| generator_codecvt (size_t refs=0) |
|
virtual base::result | do_in (mbstate_t &mb, const char *ebegin, const char *eend, const char *&ecur, char *ibegin, char *iend, char *&icur) const __NO_THROW |
|
virtual bool | do_always_noconv () const __NO_THROW |
|
virtual int | do_encoding () const __NO_THROW |
|
virtual int | do_length (mbstate_t &mb, const char *efrom, const char *eend, size_t m) const |
|
virtual int | do_max_length () const __NO_THROW |
|
| codecvt (size_t __refs=0) |
|
result | out (state_type &__state, const char *__from, const char *__from_end, const char *&__from_next, char *__to, char *__to_limit, char *&__to_next) const |
|
result | unshift (state_type &__state, char *__to, char *__to_limit, char *&__to_next) const |
|
result | in (state_type &__state, const char *__from, const char *__from_end, const char *&__from_next, char *__to, char *__to_limit, char *&__to_next) const |
|
int | encoding () const _STLP_NOTHROW |
|
bool | always_noconv () const _STLP_NOTHROW |
|
int | length (state_type &__state, const char *__from, const char *__from_end, size_t __max) const |
|
int | max_length () const _STLP_NOTHROW |
|
|
static _STLP_STATIC_DECLSPEC locale::id | id = { 3 } |
|
| ~codecvt () |
|
virtual result | do_out (state_type &, const char *__from, const char *, const char *&__from_next, char *__to, char *, char *&__to_next) const |
|
virtual result | do_in (state_type &, const char *__from, const char *, const char *&__from_next, char *__to, char *, char *&__to_next) const |
|
virtual result | do_unshift (state_type &, char *__to, char *, char *&__to_next) const |
|
virtual int | do_encoding () const _STLP_NOTHROW |
|
virtual bool | do_always_noconv () const _STLP_NOTHROW |
|
virtual int | do_length (state_type &__state, const char *__from, const char *__end, size_t __max) const |
|
virtual int | do_max_length () const _STLP_NOTHROW |
|
| facet (size_t __init_count=0) |
|
virtual | ~facet () |
|
| _Refcount_Base (__stl_atomic_t __n) |
|
__stl_atomic_t | _M_incr () |
|
__stl_atomic_t | _M_decr () |
|
Definition at line 148 of file codecvt_test.cpp.
◆ base
◆ generator_codecvt()
generator_codecvt::generator_codecvt |
( |
size_t |
refs = 0 | ) |
|
|
inlineexplicit |
◆ do_always_noconv()
virtual bool generator_codecvt::do_always_noconv |
( |
| ) |
const |
|
inlinevirtual |
◆ do_encoding()
virtual int generator_codecvt::do_encoding |
( |
| ) |
const |
|
inlinevirtual |
◆ do_in()
Reimplemented from codecvt< char, char, mbstate_t >.
Definition at line 155 of file codecvt_test.cpp.
157 {
158
159 char *
state = (
char*)&mb;
160 ecur = ebegin;
161 icur = ibegin;
162
163 if (icur == iend)
return ok;
164
166 *(icur++) = 'b';
167 if (icur == iend) {
170 }
171 *(icur++) = 'c';
173 }
174 else if (*
state == 3) {
175 *(icur++) = 'c';
177 }
178
179 while (ecur != eend) {
180 if (icur == iend)
182 if (*ecur ==
'0' || *
state == 1) {
184 ++ecur;
185 }
186 if (ecur == eend) {
189 }
190
191 if (*ecur == '1') {
192 *(icur++) = 'a';
193 if (icur == iend) {
196 }
197 *(icur++) = 'b';
198 if (icur == iend) {
201 }
202 *icur = 'c';
203 }
204 else {
205 *(icur++) = '0';
206 if (icur == iend) {
208 --ecur;
209 }
211 }
212 *icur = *ecur;
213 }
214 }
215 else {
216 *icur = *ecur;
217 }
218
220 ++icur;
221 ++ecur;
222 }
223
225 }
Referenced by do_length().
◆ do_length()
Reimplemented from codecvt< char, char, mbstate_t >.
Definition at line 236 of file codecvt_test.cpp.
237 {
238 const char *
state = (
const char*)&mb;
242 else if (*
state == 3)
244
245 char *ibegin =
new char[
m +
offset];
246 const char *ecur = efrom;
247 char *icur = ibegin;
249 do_in(tmpState, efrom, eend, ecur, ibegin, ibegin +
m +
offset, icur);
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268 delete[] ibegin;
269 return (
int)
min((
size_t)(ecur - efrom),
m);
270 }
virtual base::result do_in(mbstate_t &mb, const char *ebegin, const char *eend, const char *&ecur, char *ibegin, char *iend, char *&icur) const __NO_THROW
◆ do_max_length()
virtual int generator_codecvt::do_max_length |
( |
| ) |
const |
|
inlinevirtual |
The documentation for this struct was generated from the following file: