ReactOS 0.4.15-dev-7934-g1dc8d80
locale_impl.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 1999
3 * Silicon Graphics Computer Systems, Inc.
4 *
5 * Copyright (c) 1999
6 * Boris Fomitchev
7 *
8 * This material is provided "as is", with absolutely no warranty expressed
9 * or implied. Any use is at your own risk.
10 *
11 * Permission to use or copy this software for any purpose is hereby granted
12 * without fee, provided the above notices are retained on all copies.
13 * Permission to modify the code and to distribute modified code is granted,
14 * provided the above notices are retained, and a notice that the code was
15 * modified is included with the above copyright notice.
16 *
17 */
18
19#ifndef LOCALE_IMPL_H
20#define LOCALE_IMPL_H
21
22#include <clocale> // C locale header file.
23#include <vector>
24#include <string>
25#include <locale>
26#include "c_locale.h"
27
29
30#if defined (_STLP_USE_TEMPLATE_EXPORT)
31//Export of _Locale_impl facets container:
32# if !defined (_STLP_USE_PTR_SPECIALIZATIONS)
33//If we are using pointer specialization, vector<locale::facet*> will use
34//the already exported vector<void*> implementation.
36
38
41
43# endif
44# if defined (_STLP_DEBUG)
46# define _STLP_NON_DBG_VECTOR _STLP_NON_DBG_NAME(vector)
48_STLP_EXPORT_TEMPLATE_CLASS _STLP_NON_DBG_VECTOR<locale::facet*, allocator<locale::facet*> >;
49# undef _STLP_NON_DBG_VECTOR
51# endif
52
54#endif
55
56//----------------------------------------------------------------------
57// Class _Locale_impl
58// This is the base class which implements access only and is supposed to
59// be used for classic locale only
61 public:
62 _Locale_impl(const char* s);
64 _Locale_impl(size_t n, const char* s);
65
66 private:
68
69 public:
70 size_t size() const { return facets_vec.size(); }
71
73
74 static void _STLP_FUNCTION_THROWS _STLP_CALL _M_throw_bad_cast();
75
76 private:
77 void operator=(const _Locale_impl&);
78
79 public:
81 public:
82 Init();
83 ~Init();
84 private:
85 _Refcount_Base& _M_count() const;
86 };
87
88 static void _STLP_CALL _S_initialize();
89 static void _STLP_CALL _S_uninitialize();
90
91 static void make_classic_locale();
92 static void free_classic_locale();
93
94 friend class Init;
95
96 public:
97 // void remove(size_t index);
99 void insert(_Locale_impl* from, const locale::id& n);
100
101 // Helper functions for byname construction of locales.
102 _Locale_name_hint* insert_ctype_facets(const char* &name, char *buf, _Locale_name_hint* hint);
103 _Locale_name_hint* insert_numeric_facets(const char* &name, char *buf, _Locale_name_hint* hint);
104 _Locale_name_hint* insert_time_facets(const char* &name, char *buf, _Locale_name_hint* hint);
105 _Locale_name_hint* insert_collate_facets(const char* &name, char *buf, _Locale_name_hint* hint);
106 _Locale_name_hint* insert_monetary_facets(const char* &name, char *buf, _Locale_name_hint* hint);
107 _Locale_name_hint* insert_messages_facets(const char* &name, char *buf, _Locale_name_hint* hint);
108
109 bool operator != (const locale& __loc) const { return __loc._M_impl != this; }
110
111 private:
113
114 private:
116 friend void _STLP_CALL _release_Locale_impl( _Locale_impl *& loc );
117#if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) || \
118 defined (_STLP_SIGNAL_RUNTIME_COMPATIBILITY) || defined (_STLP_CHECK_RUNTIME_COMPATIBILITY)
119 friend class _STLP_NO_MEM_T_NAME(loc);
120#else
121 friend class locale;
122#endif
123};
124
126
128
129#endif
130
131// Local Variables:
132// mode:C++
133// End:
bool _STLP_CALL operator!=(const allocator< _T1 > &, const allocator< _T2 > &) _STLP_NOTHROW
Definition: _alloc.h:384
#define _STLP_CALL
Definition: _bc.h:131
_STLP_DECLSPEC _Locale_impl *_STLP_CALL _copy_Nameless_Locale_impl(_Locale_impl *locimpl)
vector< locale::facet * > facets_vec
Definition: locale_impl.h:112
basic_string< char, char_traits< char >, allocator< char > > name
Definition: locale_impl.h:72
static void free_classic_locale()
size_t size() const
Definition: locale_impl.h:70
void operator=(const _Locale_impl &)
Definition: _locale.h:75
_Locale_impl * _M_impl
Definition: _locale.h:203
#define _STLP_FUNCTION_THROWS
Definition: features.h:872
#define _STLP_MOVE_TO_STD_NAMESPACE
Definition: features.h:525
#define _STLP_CLASS_DECLSPEC
Definition: features.h:983
#define _STLP_EXPORT_TEMPLATE_CLASS
Definition: features.h:987
#define _STLP_BEGIN_NAMESPACE
Definition: features.h:501
#define _STLP_END_NAMESPACE
Definition: features.h:503
#define _STLP_MOVE_TO_PRIV_NAMESPACE
Definition: features.h:524
GLdouble s
Definition: gl.h:2039
GLdouble n
Definition: glext.h:7729
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
void _STLP_CALL _release_Locale_impl(_Locale_impl *&loc)
CardRegion * from
Definition: spigame.cpp:19
Definition: name.c:39
DWORD hint
Definition: vfdcmd.c:88
static int insert
Definition: xmllint.c:138