|
1 /* |
|
2 * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. |
|
3 * Copyright (c) 1999 |
|
4 * Silicon Graphics Computer Systems, Inc. |
|
5 * |
|
6 * Copyright (c) 1999 |
|
7 * Boris Fomitchev |
|
8 * |
|
9 * This material is provided "as is", with absolutely no warranty expressed |
|
10 * or implied. Any use is at your own risk. |
|
11 * |
|
12 * Permission to use or copy this software for any purpose is hereby granted |
|
13 * without fee, provided the above notices are retained on all copies. |
|
14 * Permission to modify the code and to distribute modified code is granted, |
|
15 * provided the above notices are retained, and a notice that the code was |
|
16 * modified is included with the above copyright notice. |
|
17 * |
|
18 */ |
|
19 # include "stlport_prefix.h" |
|
20 |
|
21 # include "message_facets.h" |
|
22 |
|
23 _STLP_BEGIN_NAMESPACE |
|
24 |
|
25 //---------------------------------------------------------------------- |
|
26 // messages<char> |
|
27 |
|
28 _STLP_EXP_DECLSPEC messages<char>::messages(_Messages* imp) : |
|
29 _BaseFacet(1), _M_impl(imp) { imp->_M_delete = false; } |
|
30 |
|
31 _STLP_EXP_DECLSPEC messages<char>::~messages() |
|
32 { |
|
33 if (_M_impl && _M_impl->_M_delete) delete _M_impl; |
|
34 } |
|
35 |
|
36 _STLP_EXP_DECLSPEC int messages<char>::do_open(const string& filename, const locale& l) const |
|
37 { |
|
38 return _M_impl->do_open(filename, l); |
|
39 } |
|
40 |
|
41 _STLP_EXP_DECLSPEC string messages<char>::do_get(catalog cat, |
|
42 int set, int p_id, const string& dfault) const |
|
43 { |
|
44 return _M_impl->do_get(cat, set, p_id, dfault); |
|
45 } |
|
46 |
|
47 _STLP_EXP_DECLSPEC void messages<char>::do_close(catalog cat) const |
|
48 { |
|
49 _M_impl->do_close(cat); |
|
50 } |
|
51 |
|
52 _STLP_EXP_DECLSPEC _Messages::_Messages() |
|
53 { } |
|
54 |
|
55 _STLP_EXP_DECLSPEC _Messages::~_Messages() |
|
56 {} |
|
57 |
|
58 _STLP_EXP_DECLSPEC int _Messages::do_open(const string&, const locale&) const |
|
59 { |
|
60 return -1; |
|
61 } |
|
62 |
|
63 string _Messages::do_get(catalog, |
|
64 int, int, const string& dfault) const |
|
65 { |
|
66 return dfault; |
|
67 } |
|
68 |
|
69 void _Messages::do_close(catalog) const |
|
70 {} |
|
71 |
|
72 |
|
73 # ifndef _STLP_NO_WCHAR_T |
|
74 |
|
75 _STLP_EXP_DECLSPEC messages<wchar_t>::messages(_Messages* imp) : |
|
76 _BaseFacet(1), _M_impl(imp) { imp->_M_delete = false; } |
|
77 |
|
78 _STLP_EXP_DECLSPEC messages<wchar_t>::~messages() |
|
79 { if (_M_impl && _M_impl->_M_delete) delete _M_impl; } |
|
80 |
|
81 _STLP_EXP_DECLSPEC int messages<wchar_t>::do_open(const string& filename, const locale& L) const |
|
82 { |
|
83 return _M_impl->do_open(filename, L); |
|
84 } |
|
85 |
|
86 _STLP_EXP_DECLSPEC wstring |
|
87 messages<wchar_t>::do_get(catalog thecat, |
|
88 int set, int p_id, const wstring& dfault) const |
|
89 { |
|
90 return _M_impl->do_get(thecat, set, p_id, dfault); |
|
91 } |
|
92 |
|
93 _STLP_EXP_DECLSPEC void messages<wchar_t>::do_close(catalog cat) const |
|
94 { |
|
95 _M_impl->do_close(cat); |
|
96 } |
|
97 |
|
98 wstring |
|
99 _Messages::do_get(catalog, |
|
100 int, int, const wstring& dfault) const |
|
101 { |
|
102 return dfault; |
|
103 } |
|
104 |
|
105 # endif |
|
106 |
|
107 _STLP_END_NAMESPACE |
|
108 |
|
109 // Local Variables: |
|
110 // mode:C++ |
|
111 // End: |
|
112 |