home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / stlpt453.zip / STLport-4.5.3 / src / numpunct.cpp < prev    next >
C/C++ Source or Header  |  2001-01-26  |  2KB  |  74 lines

  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. # include <stl/_numpunct.h>
  20.  
  21. _STLP_BEGIN_NAMESPACE
  22.  
  23. //----------------------------------------------------------------------
  24. // numpunct<char>
  25. char   numpunct<char>::do_decimal_point() const {return '.';}
  26. char   numpunct<char>::do_thousands_sep() const { return ','; }
  27. string numpunct<char>::do_grouping()  const { return string();}
  28. string numpunct<char>::do_truename()  const { return _M_truename;}
  29. string numpunct<char>::do_falsename() const { return _M_falsename; }
  30. numpunct<char>::~numpunct() {}
  31.  
  32. _STLP_STATIC_MEMBER_DECLSPEC  string numpunct<char>::_M_truename("true");
  33. _STLP_STATIC_MEMBER_DECLSPEC  string  numpunct<char>::_M_falsename("false");
  34. _STLP_STATIC_MEMBER_DECLSPEC  string numpunct<char>::_M_grouping("");
  35.  
  36. # ifndef _STLP_NO_WCHAR_T
  37.  
  38. numpunct<wchar_t>::~numpunct() {}
  39.  
  40. wchar_t numpunct<wchar_t>::do_decimal_point() const { return L'.'; }
  41.  
  42. wchar_t numpunct<wchar_t>::do_thousands_sep() const
  43. {
  44.   return L',';
  45. }
  46.  
  47. string numpunct<wchar_t>::do_grouping() const
  48. {
  49.   return string();
  50. }
  51.  
  52.  
  53. wstring numpunct<wchar_t>::do_truename() const
  54. {
  55.   return _M_truename;
  56. }
  57.  
  58. wstring numpunct<wchar_t>::do_falsename() const
  59. {
  60.   return _M_falsename;
  61.  
  62. _STLP_STATIC_MEMBER_DECLSPEC  wstring numpunct<wchar_t>::_M_truename(L"true");
  63. _STLP_STATIC_MEMBER_DECLSPEC  wstring numpunct<wchar_t>::_M_falsename(L"false");
  64. _STLP_STATIC_MEMBER_DECLSPEC  string numpunct<wchar_t>::_M_grouping("");
  65. # endif
  66.  
  67. _STLP_END_NAMESPACE
  68.  
  69. // Local Variables:
  70. // mode:C++
  71. // End:
  72.  
  73.