home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 May / PCP163A.iso / Runimage / Cbuilder4 / Include / Rw / VENDOR.H < prev   
Encoding:
C/C++ Source or Header  |  1999-01-26  |  3.8 KB  |  95 lines

  1. #ifndef __VENDOR_H
  2. #define __VENDOR_H
  3. #pragma option push -b -a8 -pc -Vx- -Ve- -w-inl -w-aus -w-sig
  4. /***************************************************************************
  5.  *
  6.  * vendor -- Vendor-supplied declarations for the Standard Library locale
  7.  *           classes.
  8.  *
  9.  * $Id: vendor,v 1.10 1996/10/02 01:48:00 smithey Exp $
  10.  *
  11.  ***************************************************************************
  12.  *
  13.  * (c) Copyright 1994, 1998 Rogue Wave Software, Inc.
  14.  * ALL RIGHTS RESERVED
  15.  *
  16.  * The software and information contained herein are proprietary to, and
  17.  * comprise valuable trade secrets of, Rogue Wave Software, Inc., which
  18.  * intends to preserve as trade secrets such software and information.
  19.  * This software is furnished pursuant to a written license agreement and
  20.  * may be used, copied, transmitted, and stored only in accordance with
  21.  * the terms of such license and with the inclusion of the above copyright
  22.  * notice.  This software and information or any other copies thereof may
  23.  * not be provided or otherwise made available to any other person.
  24.  *
  25.  * Notwithstanding any other lease or license that may pertain to, or
  26.  * accompany the delivery of, this computer software and information, the
  27.  * rights of the Government regarding its use, reproduction and disclosure
  28.  * are as set forth in Section 52.227-19 of the FARS Computer
  29.  * Software-Restricted Rights clause.
  30.  * 
  31.  * Use, duplication, or disclosure by the Government is subject to
  32.  * restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
  33.  * Technical Data and Computer Software clause at DFARS 252.227-7013.
  34.  * Contractor/Manufacturer is Rogue Wave Software, Inc.,
  35.  * P.O. Box 2328, Corvallis, Oregon 97339.
  36.  *
  37.  * This computer software and information is distributed with "restricted
  38.  * rights."  Use, duplication or disclosure is subject to restrictions as
  39.  * set forth in NASA FAR SUP 18-52.227-79 (April 1985) "Commercial
  40.  * Computer Software-Restricted Rights (April 1985)."  If the Clause at
  41.  * 18-52.227-74 "Rights in Data General" is specified in the contract,
  42.  * then the "Alternate III" clause applies.
  43.  *
  44.  ***************************************************************************
  45.  *
  46.  *
  47.  **************************************************************************/
  48.  
  49. #ifndef __STD_LOC_VENDOR
  50. #define __STD_LOC_VENDOR
  51.  
  52. #include <rw/ctype>
  53. #include <rw/numeral>
  54.  
  55. #ifndef _RWSTD_NO_NAMESPACE
  56. namespace __rwstd {
  57. #endif
  58.  
  59. // --------------------------------------------------------
  60. // Implementation function template -- create_native_facet.
  61. // --------------------------------------------------------
  62.  
  63. // Vendors must specialize this inline function template for each facet of the
  64. // vendor-default native ("") locale that is different from the same facet of
  65. // the classic locale.  Each specialization should construct and return a new
  66. // instance of the requested native-behavior facet with an initial reference
  67. // count of 1 (not the default 0!).
  68.  
  69. // Note that a specialization for ctype<char> must always be provided, because
  70. // ctype<char> lacks a constructor with the signature used in the template.
  71.  
  72. inline _RW_STD::ctype<char>* create_native_facet (_RW_STD::ctype<char>*) {
  73.   return new _RW_STD::ctype<char>(NULL,false,1);
  74. }
  75.  
  76. inline _RW_STD::numpunct<char>* create_native_facet (_RW_STD::numpunct<char>*) {
  77.   return new _RW_STD::numpunct_byname<char>("",1);
  78. }
  79.  
  80. // The default template function for Facets not specialized above returns a
  81. // facet with classic-locale behavior.
  82.  
  83. template <class Facet>
  84. inline Facet* create_native_facet (Facet*) {
  85.   return create_named_facet((Facet*)0,"",(size_t)1);
  86. }
  87.  
  88. #ifndef _RWSTD_NO_NAMESPACE
  89. } // namespace __rwstd
  90. #endif
  91.  
  92. #endif // __STD_LOC_VENDOR
  93. #pragma option pop
  94. #endif /* __VENDOR_H */
  95.