locale_impl.h

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 
00019 # ifndef LOCALE_IMPL_H
00020 #  define  LOCALE_IMPL_H
00021 
00022 #include <clocale>             // C locale header file.
00023 #include <vector>
00024 #include <string>
00025 #include <stl/_locale.h>
00026 #include "c_locale.h"
00027 
00028 _STLP_BEGIN_NAMESPACE
00029 
00030 //----------------------------------------------------------------------
00031 // Class _Locale_impl
00032 // This is the base class which implements access only and is supposed to 
00033 // be used for classic locale only
00034 class _STLP_CLASS_DECLSPEC _Locale_impl
00035 {
00036 public:
00037   _Locale_impl(const char* s);
00038   //  _Locale_impl(const _Locale_impl&);
00039   virtual ~_Locale_impl();
00040 
00041   virtual void incr();
00042   virtual void decr();
00043 
00044   size_t size() const { return _M_size; }
00045 
00046   static _Locale_impl* make_classic_locale();
00047   
00048   locale::facet** facets;
00049   size_t _M_size;
00050 
00051   basic_string<char, char_traits<char>, allocator<char> > name;
00052 
00053   static void _STLP_CALL _M_throw_bad_cast();
00054 
00055 private:
00056   void operator=(const _Locale_impl&);
00057 };
00058 
00059 inline _Locale_impl*  _STLP_CALL _S_copy_impl(_Locale_impl* I) {
00060     _STLP_ASSERT( I != 0 );
00061     I->incr();
00062     return I;
00063 }
00064 
00065 extern _Locale_impl*   _Stl_loc_global_impl;
00066 // extern locale*         _Stl_loc_classic_locale;
00067 extern _STLP_STATIC_MUTEX _Stl_loc_global_locale_lock;
00068 
00069 _STLP_END_NAMESPACE
00070 
00071 #endif
00072 
00073 

Generated on Mon Jun 5 10:20:45 2006 for Intelligence.kdevelop by  doxygen 1.4.6