Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
_money_get.h
Go to the documentation of this file.
1
32#ifndef _RWSTD_LOC_MONEY_GET_H_INCLUDED
33#define _RWSTD_LOC_MONEY_GET_H_INCLUDED
34
35
36#if __GNUG__ >= 3
37# pragma GCC system_header
38#endif // gcc >= 3
39
40
41#include <string>
42#include <rw/_ioiter.h>
43#include <rw/_iosfwd.h>
44#include <loc/_facet.h>
45#include <rw/_defs.h>
46
47
49
50
52template <class _CharT, class _InputIter = istreambuf_iterator<_CharT> >
53struct money_get: _RW::__rw_facet
54{
55 typedef _CharT char_type;
56 typedef _InputIter iter_type;
57 typedef
58 basic_string<char_type, char_traits<char_type>, allocator<char_type> >
59 string_type;
60
61 explicit money_get (_RWSTD_SIZE_T __ref = 0)
62 : _RW::__rw_facet (__ref) { }
63
64 iter_type get (iter_type __begin, iter_type __end, bool __intl,
65 ios_base &__flags, _RWSTD_IOSTATE &__err,
66 long double &__val) const {
67 return do_get (__begin, __end, __intl, __flags, __err, __val);
68 }
69
70 iter_type get (iter_type __begin, iter_type __end, bool __intl,
71 ios_base &__flags, _RWSTD_IOSTATE &__err,
72 string_type &__str) const {
73 return do_get (__begin, __end, __intl, __flags, __err, __str);
74 }
75
76 static _RW::__rw_facet_id id;
77
78protected:
79
80#ifndef _RWSTD_NO_LONG_DOUBLE
81
82 virtual iter_type
83 do_get (iter_type __it, iter_type __end, bool __intl, ios_base &__fl,
84 _RWSTD_IOSTATE &__err, long double &__val) const {
85 return _C_get (__it, __end, __intl, __fl, __err, &__val, 0);
86 }
87
88#else // if defined (_RWSTD_NO_LONG_DOUBLE)
89
90 virtual iter_type
91 do_get (iter_type __it, iter_type __end, bool __intl, ios_base &__fl,
92 _RWSTD_IOSTATE &__err, double &__val) const {
93 return _C_get (__it, __end, __intl, __fl, __err, &__val, 0);
94 }
95
96#endif // _RWSTD_NO_LONG_DOUBLE
97
98 virtual iter_type
99 do_get (iter_type __it, iter_type __end, bool __intl, ios_base &__fl,
100 _RWSTD_IOSTATE &__err, string_type &__str) const {
101 return _C_get (__it, __end, __intl, __fl, __err, 0, &__str);
102 }
103
104private:
105
106 iter_type
107 _C_get (iter_type, iter_type, bool, ios_base&,
108 _RWSTD_IOSTATE&, void*, string_type*) const;
109};
110
111
112#ifndef _RWSTD_NO_SPECIALIZED_FACET_ID
113
115_RW::__rw_facet_id money_get<char, istreambuf_iterator<char> >::id;
116
117# ifndef _RWSTD_NO_WCHAR_T
118
120_RW::__rw_facet_id money_get<wchar_t, istreambuf_iterator<wchar_t> >::id;
121
122# endif // _RWSTD_NO_WCHAR_T
123#endif // _RWSTD_NO_SPECIALIZED_FACET_ID
124
125} // namespace std
126
127
128#if _RWSTD_DEFINE_TEMPLATE_FIRST (_MONEY_GET)
129# include <loc/_money_get.cc>
130#endif // _RWSTD_DEFINE_TEMPLATE_FIRST (_MONEY_GET)
131
132
133#ifdef _RWSTD_MSVC
134# pragma warning (push)
135# pragma warning (disable: 4231)
136#endif // _RWSTD_MSVC
137
138
140
141#if _RWSTD_INSTANTIATE (_MONEY_GET, _CHAR)
142
143_RWSTD_INSTANTIATE_1 (struct _RWSTD_TI_EXPORT money_get<char>);
144
145#endif // _RWSTD_INSTANTIATE (_MONEY_GET, _CHAR)
146
147#if _RWSTD_INSTANTIATE (_MONEY_GET, _WCHAR_T)
148
149_RWSTD_INSTANTIATE_1 (struct _RWSTD_TI_EXPORT money_get<wchar_t>);
150
151#endif // _RWSTD_INSTANTIATE (_MONEY_GET, _WCHAR_T)
152
153} // namespace std
154
155
156#ifdef _RWSTD_MSVC
157# pragma warning (pop)
158#endif // _RWSTD_MSVC
159
160
161#if _RWSTD_DEFINE_TEMPLATE_LAST (_MONEY_GET)
162# include <loc/_money_get.cc>
163#endif // _RWSTD_DEFINE_TEMPLATE_LAST (_MONEY_GET)
164
165
166#endif // _RWSTD_LOC_MONEY_GET_H_INCLUDED
#define _RWSTD_SPECIALIZED_CLASS
#define _RWSTD_INSTANTIATE_1(arg)
Definition _defs.h:1374
#define _RWSTD_NAMESPACE(name)
Definition _defs.h:567
#define _EXPORT
Definition _defs.h:498
#define _RWSTD_TI_EXPORT
Definition _defs.h:1331
#define _RWSTD_IOSTATE
Definition _iosfwd.h:91
Definition json.h:5363