sl@0: /* sl@0: * Copyright (c) 1999 sl@0: * Silicon Graphics Computer Systems, Inc. sl@0: * sl@0: * Copyright (c) 1999 sl@0: * Boris Fomitchev sl@0: * sl@0: * This material is provided "as is", with absolutely no warranty expressed sl@0: * or implied. Any use is at your own risk. sl@0: * sl@0: * Permission to use or copy this software for any purpose is hereby granted sl@0: * without fee, provided the above notices are retained on all copies. sl@0: * Permission to modify the code and to distribute modified code is granted, sl@0: * provided the above notices are retained, and a notice that the code was sl@0: * modified is included with the above copyright notice. sl@0: * sl@0: */ sl@0: #ifndef _STLP_LOCALE sl@0: #define _STLP_LOCALE sl@0: sl@0: // Basic framework: class locale and class locale::facet sl@0: sl@0: #ifndef _STLP_OUTERMOST_HEADER_ID sl@0: # define _STLP_OUTERMOST_HEADER_ID 0x1041 sl@0: # include sl@0: #endif sl@0: sl@0: #ifdef _STLP_PRAGMA_ONCE sl@0: # pragma once sl@0: #endif sl@0: sl@0: #include sl@0: sl@0: // Individual facets sl@0: #ifndef _STLP_INTERNAL_CTYPE_H sl@0: # include sl@0: #endif sl@0: sl@0: #ifndef _STLP_INTERNAL_CODECVT_H sl@0: # include sl@0: #endif sl@0: sl@0: #ifndef _STLP_INTERNAL_COLLATE_H sl@0: # include sl@0: #endif sl@0: sl@0: #ifndef _STLP_INTERNAL_NUM_PUT_H sl@0: # include sl@0: #endif sl@0: sl@0: #ifndef _STLP_INTERNAL_NUM_GET_H sl@0: # include sl@0: #endif sl@0: sl@0: // those never included separately anyway sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: // some stuff for streambuf iterators ended up defined there sl@0: // Strictly speaking, _istream.h portion is only required for , but it may break too many sl@0: // programs if we omit it sl@0: #ifndef _STLP_ISTREAM_H sl@0: # include sl@0: #endif sl@0: sl@0: // Convenience interfaces sl@0: #undef isspace sl@0: #undef isprint sl@0: #undef iscntrl sl@0: #undef isupper sl@0: #undef islower sl@0: #undef isalpha sl@0: #undef isdigit sl@0: #undef ispunct sl@0: #undef isxdigit sl@0: #undef isalnum sl@0: #undef isgraph sl@0: #undef toupper sl@0: #undef tolower sl@0: sl@0: _STLP_BEGIN_NAMESPACE sl@0: sl@0: template sl@0: inline bool isspace (_CharT c, const locale& loc) sl@0: { return (use_facet >(loc)).is(ctype_base::space, c); } sl@0: sl@0: template sl@0: inline bool isprint (_CharT c, const locale& loc) sl@0: { return (use_facet >(loc)).is(ctype_base::print, c); } sl@0: sl@0: template sl@0: inline bool iscntrl (_CharT c, const locale& loc) sl@0: { return (use_facet >(loc)).is(ctype_base::cntrl, c); } sl@0: sl@0: template sl@0: inline bool isupper (_CharT c, const locale& loc) sl@0: { return (use_facet >(loc)).is(ctype_base::upper, c); } sl@0: sl@0: template sl@0: inline bool islower (_CharT c, const locale& loc) sl@0: { return (use_facet >(loc)).is(ctype_base::lower, c); } sl@0: sl@0: template sl@0: inline bool isalpha (_CharT c, const locale& loc) sl@0: { return (use_facet >(loc)).is(ctype_base::alpha, c); } sl@0: sl@0: template sl@0: inline bool isdigit (_CharT c, const locale& loc) sl@0: { return (use_facet >(loc)).is(ctype_base::digit, c); } sl@0: sl@0: template sl@0: inline bool ispunct (_CharT c, const locale& loc) sl@0: { return (use_facet >(loc)).is(ctype_base::punct, c); } sl@0: sl@0: template sl@0: inline bool isxdigit (_CharT c, const locale& loc) sl@0: { return (use_facet >(loc)).is(ctype_base::xdigit, c); } sl@0: sl@0: template sl@0: inline bool isalnum (_CharT c, const locale& loc) sl@0: { return (use_facet >(loc)).is(ctype_base::alnum, c); } sl@0: sl@0: template sl@0: inline bool isgraph (_CharT c, const locale& loc) sl@0: { return (use_facet >(loc)).is(ctype_base::graph, c); } sl@0: sl@0: template sl@0: inline _CharT toupper(_CharT c, const locale& loc) sl@0: { return (use_facet >(loc)).toupper(c); } sl@0: sl@0: template sl@0: inline _CharT tolower(_CharT c, const locale& loc) sl@0: { return (use_facet >(loc)).tolower(c); } sl@0: sl@0: _STLP_END_NAMESPACE sl@0: sl@0: #if (_STLP_OUTERMOST_HEADER_ID == 0x1041) sl@0: # include sl@0: # undef _STLP_OUTERMOST_HEADER_ID sl@0: #endif sl@0: sl@0: #endif /* _STLP_LOCALE */ sl@0: sl@0: sl@0: // Local Variables: sl@0: // mode:C++ sl@0: // End: