sl@0: /* sl@0: * Copyright (c) 1999 sl@0: * Silicon Graphics Computer Systems, Inc. sl@0: * sl@0: * Copyright (c) 1999 sl@0: * Boris Fomitchev sl@0: * sl@0: * This material is provided "as is", with absolutely no warranty expressed sl@0: * or implied. Any use is at your own risk. sl@0: * sl@0: * Permission to use or copy this software for any purpose is hereby granted sl@0: * without fee, provided the above notices are retained on all copies. sl@0: * Permission to modify the code and to distribute modified code is granted, sl@0: * provided the above notices are retained, and a notice that the code was sl@0: * modified is included with the above copyright notice. sl@0: * sl@0: */ sl@0: sl@0: # ifndef LOCALE_nonclassic_H sl@0: # define LOCALE_nonclassic_H sl@0: sl@0: # include "locale_impl.h" sl@0: sl@0: _STLP_BEGIN_NAMESPACE sl@0: sl@0: class _STLP_CLASS_DECLSPEC _Locale : public _Locale_impl, public _Refcount_Base sl@0: { sl@0: public: sl@0: _Locale(size_t n, const char* s) : _Locale_impl(s), _Refcount_Base(1), sl@0: facets_vec(n, (void*)0 ) { facets = (locale::facet**)&facets_vec[0]; _M_size = n; } sl@0: _Locale(const _Locale_impl&); sl@0: ~_Locale(); sl@0: sl@0: virtual void incr() { this->_M_incr(); } sl@0: virtual void decr() { this->_M_decr(); if (!this->_M_ref_count) delete this;} sl@0: sl@0: void remove(size_t index); sl@0: locale::facet* insert(locale::facet*, size_t index, bool do_incr); sl@0: void insert(_Locale_impl* from, const locale::id& n); sl@0: sl@0: // Helper functions for byname construction of locales. sl@0: void insert_ctype_facets(const char* name); sl@0: void insert_numeric_facets(const char* name); sl@0: void insert_time_facets(const char* name); sl@0: void insert_collate_facets(const char* name); sl@0: void insert_monetary_facets(const char* name); sl@0: void insert_messages_facets(const char* name); sl@0: sl@0: vector<void*> facets_vec; sl@0: sl@0: static void _STLP_CALL _M_throw_bad_cast(); sl@0: sl@0: private: sl@0: void operator=(const _Locale_impl&); sl@0: }; sl@0: sl@0: _STLP_END_NAMESPACE sl@0: sl@0: #endif