locale_nonclassic.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_nonclassic_H
00020 #  define  LOCALE_nonclassic_H
00021 
00022 # include "locale_impl.h"
00023 
00024 _STLP_BEGIN_NAMESPACE
00025 
00026 class _STLP_CLASS_DECLSPEC _Locale : public _Locale_impl, public _Refcount_Base
00027 {
00028 public:
00029   _Locale(size_t n, const char* s) : _Locale_impl(s), _Refcount_Base(1), 
00030     facets_vec(n, (void*)0 ) { facets = (locale::facet**)&facets_vec[0]; _M_size = n; }
00031   _Locale(const _Locale_impl&);
00032   ~_Locale();
00033 
00034   virtual void incr() { this->_M_incr(); }
00035   virtual void decr() { this->_M_decr(); if (!this->_M_ref_count) delete this;}
00036 
00037   void remove(size_t index);
00038   locale::facet* insert(locale::facet*, size_t index, bool do_incr);
00039   void insert(_Locale_impl* from, const locale::id& n);
00040 
00041 // Helper functions for byname construction of locales.
00042   void insert_ctype_facets(const char* name);
00043   void insert_numeric_facets(const char* name);
00044   void insert_time_facets(const char* name);
00045   void insert_collate_facets(const char* name);
00046   void insert_monetary_facets(const char* name);
00047   void insert_messages_facets(const char* name);
00048   
00049   vector<void*> facets_vec;
00050 
00051   static void _STLP_CALL _M_throw_bad_cast();
00052 
00053 private:
00054   void operator=(const _Locale_impl&);
00055 };
00056 
00057 _STLP_END_NAMESPACE
00058 
00059 #endif

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