00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
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
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