Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
_money_put.h
Go to the documentation of this file.
1
32#ifndef _RWSTD_LOC_MONEY_PUT_H_INCLUDED
33#define _RWSTD_LOC_MONEY_PUT_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 <loc/_facet.h>
44
45
47
48struct _RWSTD_EXPORT ios_base;
49
50
51// 22.2.6.2
53template <class _CharT, class _OutputIter = ostreambuf_iterator<_CharT> >
54struct money_put: _RW::__rw_facet
55{
56 typedef _CharT char_type;
57 typedef _OutputIter iter_type;
58
59 typedef
60 basic_string<char_type, char_traits<char_type>, allocator<char_type> >
61 string_type;
62
63 explicit money_put (_RWSTD_SIZE_T __ref = 0)
64 : _RW::__rw_facet (__ref) { }
65
66 virtual ~money_put () _RWSTD_ATTRIBUTE_NOTHROW;
67
68 // 22.2.6.2.1, p1
69 iter_type put (iter_type __it, bool __intl, ios_base &__flags,
70 char_type __fill, long double __val) const {
71 return do_put (__it, __intl, __flags, __fill, __val);
72 }
73
74 iter_type put (iter_type __it, bool __intl, ios_base &__flags,
75 char_type __fill, const string_type &__val) const {
76 return do_put (__it, __intl, __flags, __fill, __val);
77 }
78
79 static _RW::__rw_facet_id id;
80
81protected:
82
83 // 22.2.6.2.2, p1
84 virtual iter_type
85 do_put (iter_type, bool, ios_base&, char_type, long double) const;
86
87 virtual iter_type
88 do_put (iter_type, bool, ios_base&, char_type, const string_type&) const;
89
90private:
91
92 enum { _C_intl = 0x1, _C_ldbl = 0x2 };
93
94 iter_type _C_put (iter_type, int, ios_base&, char_type,
95 const char_type*, _RWSTD_SIZE_T, int,
96 const char*, _RWSTD_SIZE_T) const;
97};
98
99
100#ifndef _RWSTD_NO_SPECIALIZED_FACET_ID
101
103_RW::__rw_facet_id money_put<char, ostreambuf_iterator<char> >::id;
104
105# ifndef _RWSTD_NO_WCHAR_T
106
108_RW::__rw_facet_id money_put<wchar_t, ostreambuf_iterator<wchar_t> >::id;
109
110# endif // _RWSTD_NO_WCHAR_T
111#endif // _RWSTD_NO_SPECIALIZED_FACET_ID
112
113} // namespace std
114
115
116#if _RWSTD_DEFINE_TEMPLATE_FIRST (_MONEY_PUT)
117# include <loc/_money_put.cc>
118#endif // _RWSTD_DEFINE_TEMPLATE_FIRST (_MONEY_PUT)
119
120
121#ifdef _RWSTD_MSVC
122# pragma warning (push)
123# pragma warning (disable: 4231)
124#endif // _RWSTD_MSVC
125
126
128
129#if _RWSTD_INSTANTIATE (_MONEY_PUT, _CHAR)
130
131_RWSTD_INSTANTIATE_1 (struct _RWSTD_TI_EXPORT money_put<char>);
132
133#endif // _RWSTD_INSTANTIATE (_MONEY_PUT, _CHAR)
134
135#if _RWSTD_INSTANTIATE (_MONEY_PUT, _WCHAR_T)
136
137_RWSTD_INSTANTIATE_1 (struct _RWSTD_TI_EXPORT money_put<wchar_t>);
138
139#endif // _RWSTD_INSTANTIATE (_MONEY_PUT, _WCHAR_T)
140
141} // namespace std
142
143
144#ifdef _RWSTD_MSVC
145# pragma warning (pop)
146#endif // _RWSTD_MSVC
147
148
149#if _RWSTD_DEFINE_TEMPLATE_LAST (_MONEY_PUT)
150# include <loc/_money_put.cc>
151#endif // _RWSTD_DEFINE_TEMPLATE_LAST (_MONEY_PUT)
152
153
154#endif // _RWSTD_LOC_MONEY_PUT_H_INCLUDED
#define _RWSTD_SPECIALIZED_CLASS
#define _RWSTD_EXPORT
Definition _defs.h:485
#define _RWSTD_INSTANTIATE_1(arg)
Definition _defs.h:1374
#define _RWSTD_NAMESPACE(name)
Definition _defs.h:567
#define _RWSTD_ATTRIBUTE_NOTHROW
Definition _defs.h:1179
#define _EXPORT
Definition _defs.h:498
#define _RWSTD_TI_EXPORT
Definition _defs.h:1331
Definition json.h:5363