1.1 --- a/epoc32/include/stdapis/stlport/stl/_messages_facets.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/stdapis/stlport/stl/_messages_facets.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,186 @@
1.4 -_messages_facets.h
1.5 +/*
1.6 + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved.
1.7 + *
1.8 + * Copyright (c) 1999
1.9 + * Silicon Graphics Computer Systems, Inc.
1.10 + *
1.11 + * Copyright (c) 1999
1.12 + * Boris Fomitchev
1.13 + *
1.14 + * This material is provided "as is", with absolutely no warranty expressed
1.15 + * or implied. Any use is at your own risk.
1.16 + *
1.17 + * Permission to use or copy this software for any purpose is hereby granted
1.18 + * without fee, provided the above notices are retained on all copies.
1.19 + * Permission to modify the code and to distribute modified code is granted,
1.20 + * provided the above notices are retained, and a notice that the code was
1.21 + * modified is included with the above copyright notice.
1.22 + *
1.23 + */
1.24 +
1.25 +// WARNING: This is an internal header file, included by other C++
1.26 +// standard library headers. You should not attempt to use this header
1.27 +// file directly.
1.28 +
1.29 +
1.30 +#ifndef _STLP_INTERNAL_MESSAGES_H
1.31 +#define _STLP_INTERNAL_MESSAGES_H
1.32 +
1.33 +#ifndef _STLP_IOS_BASE_H
1.34 +# include <stl/_ios_base.h>
1.35 +#endif
1.36 +
1.37 +# ifndef _STLP_C_LOCALE_H
1.38 +# include <stl/c_locale.h>
1.39 +# endif
1.40 +
1.41 +#ifndef _STLP_STRING_H
1.42 +# include <stl/_string.h>
1.43 +#endif
1.44 +
1.45 +_STLP_BEGIN_NAMESPACE
1.46 +
1.47 +// messages facets
1.48 +
1.49 +class messages_base {
1.50 +public:
1.51 + typedef int catalog;
1.52 +};
1.53 +
1.54 +template <class _CharT> class messages {};
1.55 +
1.56 +class _Messages;
1.57 +
1.58 +_STLP_TEMPLATE_NULL
1.59 +#ifdef __SYMBIAN32__
1.60 +class messages<char> : public locale::facet, public messages_base
1.61 +#else
1.62 +class _STLP_CLASS_DECLSPEC messages<char> : public locale::facet, public messages_base
1.63 +#endif
1.64 +{
1.65 + friend class _Locale;
1.66 +public:
1.67 + typedef messages_base::catalog catalog;
1.68 + typedef char char_type;
1.69 + typedef string string_type;
1.70 +
1.71 + _STLP_DECLSPEC explicit messages(size_t __refs = 0);
1.72 +
1.73 + catalog open(const string& __fn, const locale& __loc) const
1.74 + { return do_open(__fn, __loc); }
1.75 + string_type get(catalog __c, int __set, int __msgid,
1.76 + const string_type& __dfault) const
1.77 + { return do_get(__c, __set, __msgid, __dfault); }
1.78 + inline void close(catalog __c) const
1.79 + { do_close(__c); }
1.80 +
1.81 +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_)
1.82 + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId();
1.83 +#else
1.84 + _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
1.85 +#endif
1.86 +
1.87 + _STLP_DECLSPEC messages(_Messages*);
1.88 +
1.89 +protected:
1.90 + _STLP_DECLSPEC messages(size_t, _Locale_messages*);
1.91 +_STLP_DECLSPEC ~messages();
1.92 +
1.93 +_STLP_DECLSPEC virtual catalog do_open(const string& __fn, const locale& __loc) const;
1.94 +_STLP_DECLSPEC virtual string_type do_get(catalog __c, int __set, int __msgid,
1.95 + const string_type& __dfault) const;
1.96 +_STLP_DECLSPEC virtual void do_close(catalog __c) const;
1.97 +
1.98 + void _M_initialize(const char* __name);
1.99 +
1.100 +private:
1.101 + _Messages* _M_impl;
1.102 +};
1.103 +
1.104 +# if !defined (_STLP_NO_WCHAR_T)
1.105 +
1.106 +_STLP_TEMPLATE_NULL
1.107 +#ifdef __SYMBIAN32__
1.108 +class messages<wchar_t> : public locale::facet, public messages_base
1.109 +#else
1.110 +class _STLP_CLASS_DECLSPEC messages<wchar_t> : public locale::facet, public messages_base
1.111 +#endif
1.112 +{
1.113 + friend class _Locale;
1.114 +public:
1.115 + typedef messages_base::catalog catalog;
1.116 + typedef wchar_t char_type;
1.117 + typedef wstring string_type;
1.118 +
1.119 +_STLP_DECLSPEC explicit messages(size_t __refs = 0);
1.120 +
1.121 + inline catalog open(const string& __fn, const locale& __loc) const
1.122 + { return do_open(__fn, __loc); }
1.123 + inline string_type get(catalog __c, int __set, int __msgid,
1.124 + const string_type& __dfault) const
1.125 + { return do_get(__c, __set, __msgid, __dfault); }
1.126 + inline void close(catalog __c) const
1.127 + { do_close(__c); }
1.128 +
1.129 +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_)
1.130 + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId();
1.131 +#else
1.132 + _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
1.133 +#endif
1.134 +
1.135 + _STLP_DECLSPEC messages(_Messages*);
1.136 +
1.137 +protected:
1.138 +
1.139 +_STLP_DECLSPEC messages(size_t, _Locale_messages*);
1.140 +_STLP_DECLSPEC ~messages();
1.141 +
1.142 +_STLP_DECLSPEC virtual catalog do_open(const string& __fn, const locale& __loc) const;
1.143 +_STLP_DECLSPEC virtual string_type do_get(catalog __c, int __set, int __msgid,
1.144 + const string_type& __dfault) const;
1.145 +_STLP_DECLSPEC virtual void do_close(catalog __c) const;
1.146 +
1.147 + void _M_initialize(const char* __name);
1.148 +
1.149 +private:
1.150 + _Messages* _M_impl;
1.151 +};
1.152 +
1.153 +# endif /* WCHAR_T */
1.154 +
1.155 +template <class _CharT> class messages_byname {};
1.156 +
1.157 +_STLP_TEMPLATE_NULL
1.158 +class _STLP_CLASS_DECLSPEC messages_byname<char> : public messages<char> {
1.159 +public:
1.160 + typedef messages_base::catalog catalog;
1.161 + typedef string string_type;
1.162 +
1.163 + _STLP_DECLSPEC explicit messages_byname(const char* __name, size_t __refs = 0);
1.164 +
1.165 +protected:
1.166 +_STLP_DECLSPEC ~messages_byname();
1.167 +};
1.168 +
1.169 +# ifndef _STLP_NO_WCHAR_T
1.170 +_STLP_TEMPLATE_NULL
1.171 +class _STLP_CLASS_DECLSPEC messages_byname<wchar_t> : public messages<wchar_t> {
1.172 +public:
1.173 + typedef messages_base::catalog catalog;
1.174 + typedef wstring string_type;
1.175 +
1.176 +_STLP_DECLSPEC explicit messages_byname(const char* __name, size_t __refs = 0);
1.177 +
1.178 +protected:
1.179 +_STLP_DECLSPEC ~messages_byname();
1.180 +};
1.181 +# endif /* WCHAR_T */
1.182 +
1.183 +_STLP_END_NAMESPACE
1.184 +
1.185 +#endif /* _STLP_INTERNAL_MESSAGES_H */
1.186 +
1.187 +// Local Variables:
1.188 +// mode:C++
1.189 +// End:
1.190 +