PageRenderTime 25ms CodeModel.GetById 12ms app.highlight 11ms RepoModel.GetById 1ms app.codeStats 0ms

/project/jni/stlport/src/messages.cpp

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