/home/ntakagi/work/STLport-5.1.5/src/messages.cpp

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 1999
00003  * Silicon Graphics Computer Systems, Inc.
00004  *
00005  * Copyright (c) 1999
00006  * Boris Fomitchev
00007  *
00008  * This material is provided "as is", with absolutely no warranty expressed
00009  * or implied. Any use is at your own risk.
00010  *
00011  * Permission to use or copy this software for any purpose is hereby granted
00012  * without fee, provided the above notices are retained on all copies.
00013  * Permission to modify the code and to distribute modified code is granted,
00014  * provided the above notices are retained, and a notice that the code was
00015  * modified is included with the above copyright notice.
00016  *
00017  */
00018 #include "stlport_prefix.h"
00019 
00020 #include "message_facets.h"
00021 
00022 _STLP_BEGIN_NAMESPACE
00023 
00024 //----------------------------------------------------------------------
00025 // messages<char>
00026 
00027 messages<char>::messages(_STLP_PRIV _Messages* imp) :
00028   locale::facet(1), _M_impl(imp) { if (imp) imp->_M_delete = true; }
00029 
00030 messages<char>::~messages()
00031 { if (_M_impl && _M_impl->_M_delete) delete _M_impl; }
00032 
00033 messages<char>::catalog
00034 messages<char>::do_open(const string& filename, const locale& l) const
00035 { return _M_impl->do_open(filename, l); }
00036 
00037 string
00038 messages<char>::do_get(catalog cat, int set, int p_id,
00039                        const string& dfault) const
00040 { return _M_impl->do_get(cat, set, p_id, dfault); }
00041 
00042 void messages<char>::do_close(catalog cat) const
00043 { _M_impl->do_close(cat); }
00044 
00045 _STLP_MOVE_TO_PRIV_NAMESPACE
00046 
00047 _Messages::_Messages()
00048 {}
00049 
00050 _Messages::~_Messages()
00051 {}
00052 
00053 _Messages::catalog _Messages::do_open(const string&, const locale&) const
00054 { return -1; }
00055 
00056 string _Messages::do_get(catalog, int, int, const string& dfault) const
00057 { return dfault; }
00058 
00059 void _Messages::do_close(catalog) const
00060 {}
00061 
00062 _STLP_MOVE_TO_STD_NAMESPACE
00063 
00064 #if !defined (_STLP_NO_WCHAR_T)
00065 
00066 messages<wchar_t>::messages(_STLP_PRIV _Messages* imp) :
00067   locale::facet(1), _M_impl(imp) { if (imp) imp->_M_delete = true; }
00068 
00069 messages<wchar_t>::~messages()
00070 { if (_M_impl && _M_impl->_M_delete) delete _M_impl; }
00071 
00072 messages<wchar_t>::catalog
00073 messages<wchar_t>::do_open(const string& filename, const locale& L) const
00074 { return _M_impl->do_open(filename, L); }
00075 
00076 wstring
00077 messages<wchar_t>::do_get(catalog thecat,
00078                           int set, int p_id, const wstring& dfault) const
00079 { return _M_impl->do_get(thecat, set, p_id, dfault); }
00080 
00081 void messages<wchar_t>::do_close(catalog cat) const
00082 { _M_impl->do_close(cat); }
00083 
00084 _STLP_MOVE_TO_PRIV_NAMESPACE
00085 
00086 wstring
00087 _Messages::do_get(catalog, int, int, const wstring& dfault) const
00088 { return dfault; }
00089 
00090 _STLP_MOVE_TO_STD_NAMESPACE
00091 
00092 #endif
00093 
00094 _STLP_END_NAMESPACE
00095 
00096 // Local Variables:
00097 // mode:C++
00098 // End:



Generated on Mon Mar 10 15:32:17 2008 by  doxygen 1.5.1