ReactOS 0.4.16-dev-329-g9223134
_numpunct.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// WARNING: This is an internal header file, included by other C++
19// standard library headers. You should not attempt to use this header
20// file directly.
21
22
23#ifndef _STLP_INTERNAL_NUMPUNCT_H
24#define _STLP_INTERNAL_NUMPUNCT_H
25
26#ifndef _STLP_IOS_BASE_H
27# include <stl/_ios_base.h>
28#endif
29
30# ifndef _STLP_C_LOCALE_H
31# include <stl/c_locale.h>
32# endif
33
34#ifndef _STLP_INTERNAL_STRING_H
35# include <stl/_string.h>
36#endif
37
39
40//----------------------------------------------------------------------
41// numpunct facets
42
43template <class _CharT> class numpunct {};
44template <class _CharT> class numpunct_byname {};
45template <class _Ch, class _InIt> class num_get;
46
49public:
50 typedef char char_type;
51 typedef string string_type;
52
53 explicit numpunct(size_t __refs = 0)
54 : locale::facet(__refs) {}
55
56 char decimal_point() const { return do_decimal_point(); }
57 char thousands_sep() const { return do_thousands_sep(); }
58 string grouping() const { return do_grouping(); }
59 string truename() const { return do_truename(); }
60 string falsename() const { return do_falsename(); }
61
63
64protected:
65 ~numpunct();
66
67 virtual char do_decimal_point() const;
68 virtual char do_thousands_sep() const;
69 virtual string do_grouping() const;
70 virtual string do_truename() const;
71 virtual string do_falsename() const;
72};
73
74# if ! defined (_STLP_NO_WCHAR_T)
75
78public:
79 typedef wchar_t char_type;
80 typedef wstring string_type;
81
82 explicit numpunct(size_t __refs = 0)
83 : locale::facet(__refs) {}
84
85 wchar_t decimal_point() const { return do_decimal_point(); }
86 wchar_t thousands_sep() const { return do_thousands_sep(); }
87 string grouping() const { return do_grouping(); }
88 wstring truename() const { return do_truename(); }
89 wstring falsename() const { return do_falsename(); }
90
92
93protected:
94 ~numpunct();
95
96 virtual wchar_t do_decimal_point() const;
97 virtual wchar_t do_thousands_sep() const;
98 virtual string do_grouping() const;
99 virtual wstring do_truename() const;
100 virtual wstring do_falsename() const;
101};
102
103# endif /* WCHAR_T */
104
107 friend class _Locale_impl;
108public:
109 typedef char char_type;
110 typedef string string_type;
111
112 explicit numpunct_byname(const char* __name, size_t __refs = 0);
113
114protected:
115
117
118 virtual char do_decimal_point() const;
119 virtual char do_thousands_sep() const;
120 virtual string do_grouping() const;
121 virtual string do_truename() const;
122 virtual string do_falsename() const;
123
124private:
126 : _M_numeric(__numeric) {}
127
128 //explicitely defined as private to avoid warnings:
132
134};
135
136# ifndef _STLP_NO_WCHAR_T
139 friend class _Locale_impl;
140public:
141 typedef wchar_t char_type;
142 typedef wstring string_type;
143
144 explicit numpunct_byname(const char* __name, size_t __refs = 0);
145
146protected:
148
149 virtual wchar_t do_decimal_point() const;
150 virtual wchar_t do_thousands_sep() const;
151 virtual string do_grouping() const;
152 virtual wstring do_truename() const;
153 virtual wstring do_falsename() const;
154
155private:
157 : _M_numeric(__numeric) {}
158
159 //explicitely defined as private to avoid warnings:
163
165};
166
167# endif /* WCHAR_T */
168
170
171#endif /* _STLP_NUMPUNCT_H */
172
173// Local Variables:
174// mode:C++
175// End:
176
void operator=(const facet &)
Definition: _locale.h:75
string string_type
Definition: _numpunct.h:51
string grouping() const
Definition: _numpunct.h:58
char thousands_sep() const
Definition: _numpunct.h:57
string falsename() const
Definition: _numpunct.h:60
string truename() const
Definition: _numpunct.h:59
numpunct(size_t __refs=0)
Definition: _numpunct.h:53
static _STLP_STATIC_DECLSPEC locale::id id
Definition: _numpunct.h:62
char decimal_point() const
Definition: _numpunct.h:56
string grouping() const
Definition: _numpunct.h:87
wstring truename() const
Definition: _numpunct.h:88
static _STLP_STATIC_DECLSPEC locale::id id
Definition: _numpunct.h:91
wstring string_type
Definition: _numpunct.h:80
wchar_t decimal_point() const
Definition: _numpunct.h:85
numpunct(size_t __refs=0)
Definition: _numpunct.h:82
wstring falsename() const
Definition: _numpunct.h:89
wchar_t thousands_sep() const
Definition: _numpunct.h:86
numpunct_byname< char > _Self
Definition: _numpunct.h:129
numpunct_byname(_Self const &)
_Locale_numeric * _M_numeric
Definition: _numpunct.h:133
numpunct_byname(_Locale_numeric *__numeric)
Definition: _numpunct.h:125
numpunct_byname< wchar_t > _Self
Definition: _numpunct.h:160
numpunct_byname(_Self const &)
numpunct_byname(_Locale_numeric *__numeric)
Definition: _numpunct.h:156
_Locale_numeric * _M_numeric
Definition: _numpunct.h:164
unsigned char
Definition: typeof.h:29
#define _STLP_TEMPLATE_NULL
Definition: features.h:652
#define _STLP_STATIC_DECLSPEC
Definition: features.h:992
#define _STLP_CLASS_DECLSPEC
Definition: features.h:983
#define _STLP_BEGIN_NAMESPACE
Definition: features.h:501
#define _STLP_END_NAMESPACE
Definition: features.h:503
__WCHAR_TYPE__ wchar_t
Definition: stddef.h:311