home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / Rw / lochelp.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  2.7 KB  |  73 lines

  1. #ifndef __LOCHELP_H
  2. #define __LOCHELP_H
  3. #pragma option push -b -a8 -pc -Vx- -Ve- -w-inl -w-aus -w-sig
  4. /***************************************************************************
  5.  *
  6.  * rw/lochelp - Declarations for the Standard Library locale helper classes.
  7.  *
  8.  * $Id: lochelp,v 1.5 1996/10/02 01:48:00 smithey Exp $
  9.  *
  10.  * This header defines some classes that are used by some of the source (cpp)
  11.  * files in src/locale, mainly for manipulating the C library locale.  This
  12.  * header is not included by any other header, and never ends up in user code.
  13.  * See locale.cpp for implementation.
  14.  *
  15.  ***************************************************************************
  16.  *
  17.  * Copyright (c) 1994-1999 Rogue Wave Software, Inc.  All Rights Reserved.
  18.  *
  19.  * This computer software is owned by Rogue Wave Software, Inc. and is
  20.  * protected by U.S. copyright laws and other laws and by international
  21.  * treaties.  This computer software is furnished by Rogue Wave Software,
  22.  * Inc. pursuant to a written license agreement and may be used, copied,
  23.  * transmitted, and stored only in accordance with the terms of such
  24.  * license and with the inclusion of the above copyright notice.  This
  25.  * computer software or any other copies thereof may not be provided or
  26.  * otherwise made available to any other person.
  27.  *
  28.  * U.S. Government Restricted Rights.  This computer software is provided
  29.  * with Restricted Rights.  Use, duplication, or disclosure by the
  30.  * Government is subject to restrictions as set forth in subparagraph (c)
  31.  * (1) (ii) of The Rights in Technical Data and Computer Software clause
  32.  * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of the
  33.  * Commercial Computer Software รป Restricted Rights at 48 CFR 52.227-19,
  34.  * as applicable.  Manufacturer is Rogue Wave Software, Inc., 5500
  35.  * Flatiron Parkway, Boulder, Colorado 80301 USA.
  36.  *
  37.  **************************************************************************/
  38.  
  39. #ifndef __STD_RW_LOCHELP__
  40. #define __STD_RW_LOCHELP__
  41.  
  42. #ifndef _RWSTD_NO_NEW_HEADER
  43. #include <clocale>
  44. #else
  45. #include <locale.h>
  46. #endif
  47.  
  48. #ifndef _RWSTD_NO_NAMESPACE
  49. namespace __rwstd {
  50. #endif
  51.  
  52. // ------------------------------------------------
  53. // Implementation helper class -- use_Clib_locale.
  54. // ------------------------------------------------
  55.  
  56. class _RWSTDExport use_Clib_locale {
  57.   int saved_cat;
  58.   char *previous_locale_name;
  59.  public:
  60.   use_Clib_locale (const char *name=NULL,int cat=LC_ALL);
  61.  ~use_Clib_locale (void);
  62.  
  63.   operator bool (void) const { return previous_locale_name!=NULL; }
  64. };
  65.  
  66. #ifndef _RWSTD_NO_NAMESPACE
  67. } // namespace __rwstd
  68. #endif
  69.  
  70. #endif // __STD_RW_LOCHELP__
  71. #pragma option pop
  72. #endif /* __LOCHELP_H */
  73.