epoc32/include/tools/stlport/locale
branchSymbian3
changeset 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/tools/stlport/locale	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -0,0 +1,148 @@
     1.4 +/*
     1.5 + * Copyright (c) 1999
     1.6 + * Silicon Graphics Computer Systems, Inc.
     1.7 + *
     1.8 + * Copyright (c) 1999
     1.9 + * Boris Fomitchev
    1.10 + *
    1.11 + * This material is provided "as is", with absolutely no warranty expressed
    1.12 + * or implied. Any use is at your own risk.
    1.13 + *
    1.14 + * Permission to use or copy this software for any purpose is hereby granted
    1.15 + * without fee, provided the above notices are retained on all copies.
    1.16 + * Permission to modify the code and to distribute modified code is granted,
    1.17 + * provided the above notices are retained, and a notice that the code was
    1.18 + * modified is included with the above copyright notice.
    1.19 + *
    1.20 + */
    1.21 +#ifndef _STLP_LOCALE
    1.22 +#define _STLP_LOCALE
    1.23 +
    1.24 +// Basic framework: class locale and class locale::facet
    1.25 +
    1.26 +#ifndef _STLP_OUTERMOST_HEADER_ID
    1.27 +#  define _STLP_OUTERMOST_HEADER_ID 0x1041
    1.28 +#  include <stl/_prolog.h>
    1.29 +#endif
    1.30 +
    1.31 +#ifdef _STLP_PRAGMA_ONCE
    1.32 +#  pragma once
    1.33 +#endif
    1.34 +
    1.35 +#include <stl/_ioserr.h>
    1.36 +
    1.37 +// Individual facets
    1.38 +#ifndef _STLP_INTERNAL_CTYPE_H
    1.39 +#  include <stl/_ctype.h>
    1.40 +#endif
    1.41 +
    1.42 +#ifndef _STLP_INTERNAL_CODECVT_H
    1.43 +#  include <stl/_codecvt.h>
    1.44 +#endif
    1.45 +
    1.46 +#ifndef _STLP_INTERNAL_COLLATE_H
    1.47 +#  include <stl/_collate.h>
    1.48 +#endif
    1.49 +
    1.50 +#ifndef _STLP_INTERNAL_NUM_PUT_H
    1.51 +#  include <stl/_num_put.h>
    1.52 +#endif
    1.53 +
    1.54 +#ifndef _STLP_INTERNAL_NUM_GET_H
    1.55 +#  include <stl/_num_get.h>
    1.56 +#endif
    1.57 +
    1.58 +// those never included separately anyway
    1.59 +#include <stl/_monetary.h>
    1.60 +#include <stl/_time_facets.h>
    1.61 +#include <stl/_messages_facets.h>
    1.62 +
    1.63 +// some stuff for streambuf iterators ended up defined there
    1.64 +// Strictly speaking, _istream.h portion is only required for <iterator>, but it may break too many
    1.65 +// programs if we omit it
    1.66 +#ifndef _STLP_ISTREAM_H
    1.67 +#  include <stl/_istream.h>
    1.68 +#endif
    1.69 +
    1.70 +// Convenience interfaces
    1.71 +#undef isspace
    1.72 +#undef isprint
    1.73 +#undef iscntrl
    1.74 +#undef isupper
    1.75 +#undef islower
    1.76 +#undef isalpha
    1.77 +#undef isdigit
    1.78 +#undef ispunct
    1.79 +#undef isxdigit
    1.80 +#undef isalnum
    1.81 +#undef isgraph
    1.82 +#undef toupper
    1.83 +#undef tolower
    1.84 +
    1.85 +_STLP_BEGIN_NAMESPACE
    1.86 +
    1.87 +template <class _CharT> 
    1.88 +inline bool isspace (_CharT c, const locale& loc)
    1.89 +{ return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::space, c); }
    1.90 +
    1.91 +template <class _CharT> 
    1.92 +inline bool isprint (_CharT c, const locale& loc)
    1.93 +{ return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::print, c); }
    1.94 +
    1.95 +template <class _CharT> 
    1.96 +inline bool iscntrl (_CharT c, const locale& loc)
    1.97 +{ return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::cntrl, c); }
    1.98 +
    1.99 +template <class _CharT> 
   1.100 +inline bool isupper (_CharT c, const locale& loc)
   1.101 +{ return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::upper, c); }
   1.102 +
   1.103 +template <class _CharT> 
   1.104 +inline bool islower (_CharT c, const locale& loc)
   1.105 +{ return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::lower, c); }
   1.106 +
   1.107 +template <class _CharT> 
   1.108 +inline bool isalpha (_CharT c, const locale& loc)
   1.109 +{ return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::alpha, c); }
   1.110 +
   1.111 +template <class _CharT> 
   1.112 +inline bool isdigit (_CharT c, const locale& loc)
   1.113 +{ return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::digit, c); }
   1.114 +
   1.115 +template <class _CharT> 
   1.116 +inline bool ispunct (_CharT c, const locale& loc)
   1.117 +{ return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::punct, c); }
   1.118 +
   1.119 +template <class _CharT> 
   1.120 +inline bool isxdigit (_CharT c, const locale& loc)
   1.121 +{ return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::xdigit, c); }
   1.122 +
   1.123 +template <class _CharT> 
   1.124 +inline bool isalnum (_CharT c, const locale& loc)
   1.125 +{ return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::alnum, c); }
   1.126 +
   1.127 +template <class _CharT> 
   1.128 +inline bool isgraph (_CharT c, const locale& loc)
   1.129 +{ return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::graph, c); }
   1.130 +
   1.131 +template <class _CharT>
   1.132 +inline _CharT toupper(_CharT c, const locale& loc)
   1.133 +{ return (use_facet<ctype<_CharT> >(loc)).toupper(c); }
   1.134 +
   1.135 +template <class _CharT>
   1.136 +inline _CharT tolower(_CharT c, const locale& loc)
   1.137 +{ return (use_facet<ctype<_CharT> >(loc)).tolower(c); }
   1.138 +
   1.139 +_STLP_END_NAMESPACE
   1.140 +
   1.141 +#if (_STLP_OUTERMOST_HEADER_ID == 0x1041)
   1.142 +#  include <stl/_epilog.h>
   1.143 +#  undef _STLP_OUTERMOST_HEADER_ID
   1.144 +#endif
   1.145 +
   1.146 +#endif /* _STLP_LOCALE */
   1.147 +
   1.148 +
   1.149 +// Local Variables:
   1.150 +// mode:C++
   1.151 +// End: