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