_ctype.h revision 11cd02dfb91661c65134cac258cf5924270e9d2
111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* 211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * Copyright (c) 1999 311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * Silicon Graphics Computer Systems, Inc. 411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * 511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * Copyright (c) 1999 611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * Boris Fomitchev 711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * 811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * This material is provided "as is", with absolutely no warranty expressed 911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * or implied. Any use is at your own risk. 1011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * 1111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * Permission to use or copy this software for any purpose is hereby granted 1211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * without fee, provided the above notices are retained on all copies. 1311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * Permission to modify the code and to distribute modified code is granted, 1411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * provided the above notices are retained, and a notice that the code was 1511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * modified is included with the above copyright notice. 1611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert * 1711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert */ 1811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// WARNING: This is an internal header file, included by other C++ 1911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// standard library headers. You should not attempt to use this header 2011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// file directly. 2111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 2211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifndef _STLP_INTERNAL_CTYPE_H 2311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define _STLP_INTERNAL_CTYPE_H 2411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 2511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifndef _STLP_C_LOCALE_H 2611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert# include <stl/c_locale.h> 2711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif 2811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 2911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifndef _STLP_INTERNAL_LOCALE_H 3011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert# include <stl/_locale.h> 3111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif 3211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 3311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifndef _STLP_INTERNAL_ALGOBASE_H 3411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert# include <stl/_algobase.h> 3511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif 3611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 3711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert_STLP_BEGIN_NAMESPACE 3811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 3911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertclass _STLP_CLASS_DECLSPEC ctype_base { 4011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertpublic: 4111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert enum mask { 4211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert space = _Locale_SPACE, 4311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert print = _Locale_PRINT, 4411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert cntrl = _Locale_CNTRL, 4511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert upper = _Locale_UPPER, 4611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert lower = _Locale_LOWER, 4711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert alpha = _Locale_ALPHA, 4811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert digit = _Locale_DIGIT, 4911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert punct = _Locale_PUNCT, 5011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert xdigit = _Locale_XDIGIT, 5111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert alnum = alpha | digit, 5211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert graph = alnum | punct 5311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert }; 5411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}; 5511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 5611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// ctype<> template 5711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 5811cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class charT> class ctype {}; 5911cd02dfb91661c65134cac258cf5924270e9d2Dan Alberttemplate <class charT> class ctype_byname {}; 6011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 6111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert//ctype specializations 6211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 6311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert_STLP_TEMPLATE_NULL 6411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertclass _STLP_CLASS_DECLSPEC ctype<char> : public locale::facet, public ctype_base { 6511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifndef _STLP_NO_WCHAR_T 6611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert# ifdef _STLP_MSVC 6711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert typedef ctype<wchar_t> _Wctype; 6811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert friend _Wctype; 6911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert# else 7011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert friend class ctype<wchar_t>; 7111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert# endif 7211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif 7311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertpublic: 7411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 7511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert typedef char char_type; 7611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 7711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert explicit ctype(const mask* __tab = 0, bool __del = false, size_t __refs = 0); 7811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert bool is(mask __m, char __c) const 7911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert { return ((*(_M_ctype_table+(unsigned char)__c)) & __m) != 0; } 8011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 8111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert const char* is(const char* __low, const char* __high, mask* __vec) const { 8211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert for (const char* __p = __low;__p != __high; ++__p, ++__vec) { 8311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert *__vec = _M_ctype_table[(unsigned char)*__p]; 8411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert } 8511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert return __high; 8611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert } 8711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 8811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert const char* scan_is(mask __m, const char* __low, const char* __high) const; 8911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert const char* scan_not(mask __m, const char* __low, const char* __high) const; 9011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 9111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert char (toupper)(char __c) const { return do_toupper(__c); } 9211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert const char* (toupper)(char* __low, const char* __high) const { 9311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert return do_toupper(__low, __high); 9411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert } 9511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 9611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert char (tolower)(char __c) const { return do_tolower(__c); } 9711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert const char* (tolower)(char* __low, const char* __high) const { 9811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert return do_tolower(__low, __high); 9911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert } 10011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 10111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert char widen(char __c) const { return do_widen(__c); } 10211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert const char* widen(const char* __low, const char* __high, char* __to) const { 10311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert return do_widen(__low, __high, __to); 10411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert } 10511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 10611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert char narrow(char __c, char __dfault) const { 10711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert return do_narrow(__c, __dfault); 10811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert } 10911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert const char* narrow(const char* __low, const char* __high, 11011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert char __dfault, char* __to) const { 11111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert return do_narrow(__low, __high, __dfault, __to); 11211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert } 11311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 11411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert static _STLP_STATIC_DECLSPEC locale::id id; 11511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert _STLP_STATIC_CONSTANT(size_t, table_size = 256); 11611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 11711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertprotected: 11811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert const mask* table() const _STLP_NOTHROW { return _M_ctype_table; } 11911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert static const mask* _STLP_CALL classic_table() _STLP_NOTHROW; 12011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 12111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert ~ctype(); 12211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 12311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual char do_toupper(char __c) const; 12411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual char do_tolower(char __c) const; 12511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual const char* do_toupper(char* __low, const char* __high) const; 12611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual const char* do_tolower(char* __low, const char* __high) const; 12711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual char do_widen(char __c) const; 12811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual const char* do_widen(const char* __low, const char* __high, 12911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert char* __to) const; 13011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual char do_narrow(char __c, char /* dfault */ ) const; 13111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual const char* do_narrow(const char* __low, const char* __high, 13211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert char /* dfault */, char* __to) const; 13311cd02dfb91661c65134cac258cf5924270e9d2Dan Albertprivate: 13411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert struct _Is_mask { 13511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert mask __m; 13611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert _Is_mask(mask __x): __m(__x) {} 13711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert bool operator()(char __c) {return (__m & (unsigned char) __c) != 0;} 13811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert }; 13911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 14011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertprotected: 14111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert const mask* _M_ctype_table; 14211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertprivate: 14311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert bool _M_delete; 14411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}; 14511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 14611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert_STLP_TEMPLATE_NULL 14711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertclass _STLP_CLASS_DECLSPEC ctype_byname<char>: public ctype<char> { 14811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert friend class _Locale_impl; 14911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertpublic: 15011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert explicit ctype_byname(const char*, size_t = 0); 15111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert ~ctype_byname(); 15211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 15311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual char do_toupper(char __c) const; 15411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual char do_tolower(char __c) const; 15511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 15611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual const char* do_toupper(char*, const char*) const; 15711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual const char* do_tolower(char*, const char*) const; 15811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 15911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertprivate: 16011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert ctype_byname(_Locale_ctype* __ctype) 16111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert : _M_ctype(__ctype) 16211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert { _M_init(); } 16311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 16411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert void _M_init(); 16511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 16611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert //explicitely defined as private to avoid warnings: 16711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert typedef ctype_byname<char> _Self; 16811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert ctype_byname(_Self const&); 16911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert _Self& operator = (_Self const&); 17011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 17111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert mask _M_byname_table[table_size]; 17211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert _Locale_ctype* _M_ctype; 17311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}; 17411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 17511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert# ifndef _STLP_NO_WCHAR_T 17611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert_STLP_TEMPLATE_NULL 17711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertclass _STLP_CLASS_DECLSPEC ctype<wchar_t> : public locale::facet, public ctype_base { 17811cd02dfb91661c65134cac258cf5924270e9d2Dan Albertpublic: 17911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert typedef wchar_t char_type; 18011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 18111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert explicit ctype(size_t __refs = 0) : locale::facet(__refs) {} 18211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 18311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert bool is(mask __m, wchar_t __c) const 18411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert { return do_is(__m, __c); } 18511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 18611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert const wchar_t* is(const wchar_t* __low, const wchar_t* __high, 18711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert mask* __vec) const 18811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert { return do_is(__low, __high, __vec); } 18911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 19011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert const wchar_t* scan_is(mask __m, 19111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert const wchar_t* __low, const wchar_t* __high) const 19211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert { return do_scan_is(__m, __low, __high); } 19311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 19411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert const wchar_t* scan_not (mask __m, 19511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert const wchar_t* __low, const wchar_t* __high) const 19611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert { return do_scan_not(__m, __low, __high); } 19711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 19811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert wchar_t (toupper)(wchar_t __c) const { return do_toupper(__c); } 19911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert const wchar_t* (toupper)(wchar_t* __low, const wchar_t* __high) const 20011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert { return do_toupper(__low, __high); } 20111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 20211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert wchar_t (tolower)(wchar_t __c) const { return do_tolower(__c); } 20311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert const wchar_t* (tolower)(wchar_t* __low, const wchar_t* __high) const 20411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert { return do_tolower(__low, __high); } 20511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 20611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert wchar_t widen(char __c) const { return do_widen(__c); } 20711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert const char* widen(const char* __low, const char* __high, 20811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert wchar_t* __to) const 20911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert { return do_widen(__low, __high, __to); } 21011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 21111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert char narrow(wchar_t __c, char __dfault) const 21211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert { return do_narrow(__c, __dfault); } 21311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert const wchar_t* narrow(const wchar_t* __low, const wchar_t* __high, 21411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert char __dfault, char* __to) const 21511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert { return do_narrow(__low, __high, __dfault, __to); } 21611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 21711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert static _STLP_STATIC_DECLSPEC locale::id id; 21811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 21911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertprotected: 22011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert ~ctype(); 22111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 22211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual bool do_is(mask __m, wchar_t __c) const; 22311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual const wchar_t* do_is(const wchar_t*, const wchar_t*, mask*) const; 22411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual const wchar_t* do_scan_is(mask, 22511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert const wchar_t*, const wchar_t*) const; 22611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual const wchar_t* do_scan_not(mask, 22711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert const wchar_t*, const wchar_t*) const; 22811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual wchar_t do_toupper(wchar_t __c) const; 22911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual const wchar_t* do_toupper(wchar_t*, const wchar_t*) const; 23011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual wchar_t do_tolower(wchar_t c) const; 23111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual const wchar_t* do_tolower(wchar_t*, const wchar_t*) const; 23211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual wchar_t do_widen(char c) const; 23311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual const char* do_widen(const char*, const char*, wchar_t*) const; 23411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual char do_narrow(wchar_t __c, char __dfault) const; 23511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual const wchar_t* do_narrow(const wchar_t*, const wchar_t*, 23611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert char, char*) const; 23711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}; 23811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 23911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert_STLP_TEMPLATE_NULL 24011cd02dfb91661c65134cac258cf5924270e9d2Dan Albertclass _STLP_CLASS_DECLSPEC ctype_byname<wchar_t>: public ctype<wchar_t> { 24111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert friend class _Locale_impl; 24211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertpublic: 24311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert explicit ctype_byname(const char* __name, size_t __refs = 0); 24411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 24511cd02dfb91661c65134cac258cf5924270e9d2Dan Albertprotected: 24611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert ~ctype_byname(); 24711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 24811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual bool do_is(mask __m, wchar_t __c) const; 24911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual const wchar_t* do_is(const wchar_t*, const wchar_t*, mask*) const; 25011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual const wchar_t* do_scan_is(mask, 25111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert const wchar_t*, const wchar_t*) const; 25211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual const wchar_t* do_scan_not(mask, 25311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert const wchar_t*, const wchar_t*) const; 25411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual wchar_t do_toupper(wchar_t __c) const; 25511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual const wchar_t* do_toupper(wchar_t*, const wchar_t*) const; 25611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual wchar_t do_tolower(wchar_t c) const; 25711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert virtual const wchar_t* do_tolower(wchar_t*, const wchar_t*) const; 25811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 25911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertprivate: 26011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert ctype_byname(_Locale_ctype* __ctype) 26111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert : _M_ctype(__ctype) {} 26211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 26311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert //explicitely defined as private to avoid warnings: 26411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert typedef ctype_byname<wchar_t> _Self; 26511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert ctype_byname(_Self const&); 26611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert _Self& operator = (_Self const&); 26711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 26811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert _Locale_ctype* _M_ctype; 26911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}; 27011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 27111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert# endif /* WCHAR_T */ 27211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 27311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert_STLP_END_NAMESPACE 27411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 27511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif /* _STLP_INTERNAL_CTYPE_H */ 27611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 27711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// Local Variables: 27811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// mode:C++ 27911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert// End: 28011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert 281