Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
_time_put.h
Go to the documentation of this file.
1
32#ifndef _RWSTD_LOC_TIME_PUT_H_INCLUDED
33#define _RWSTD_LOC_TIME_PUT_H_INCLUDED
34
35
36#if __GNUG__ >= 3
37# pragma GCC system_header
38#endif // gcc >= 3
39
40
41#include <loc/_facet.h>
42#include <rw/_ioiter.h>
43#include <rw/_defs.h>
44
45#include _RWSTD_CTIME
46
47
49
50struct _RWSTD_EXPORT ios_base;
51
52
53// 22.2.5.3
55template <class _CharT, class _OutputIter = ostreambuf_iterator<_CharT> >
56struct time_put: _RW::__rw_facet
57{
58 typedef _CharT char_type;
59 typedef _OutputIter iter_type;
60
61 explicit time_put (_RWSTD_SIZE_T __refs = 0)
62 : _RW::__rw_facet (__refs) { }
63
64 virtual ~time_put () _RWSTD_ATTRIBUTE_NOTHROW;
65
66 // 22.2.5.3.1, p1
67 iter_type put (iter_type, ios_base&, char_type, const tm*,
68 const char_type*, const char_type*) const;
69
70 iter_type put (iter_type __it, ios_base& __flags, char_type __fill,
71 const tm* __tmb, char __fmt, char __modifier = 0) const {
72 return do_put (__it, __flags, __fill, __tmb, __fmt, __modifier);
73 }
74
75 static _RW::__rw_facet_id id;
76
77protected:
78
79 // 22.2.5.3.2, p1
80 virtual iter_type
81 do_put (iter_type, ios_base&, char_type, const tm*, char, char) const;
82};
83
84
85#ifndef _RWSTD_NO_SPECIALIZED_FACET_ID
86
88_RW::__rw_facet_id time_put<char, ostreambuf_iterator<char> >::id;
89
90# ifndef _RWSTD_NO_WCHAR_T
91
93_RW::__rw_facet_id time_put<wchar_t, ostreambuf_iterator<wchar_t> >::id;
94
95# endif // _RWSTD_NO_WCHAR_T
96#endif // _RWSTD_NO_SPECIALIZED_FACET_ID
97
98
99// 22.2.5.2
100template <class _CharT, class _OutputIter = ostreambuf_iterator<_CharT> >
101class time_put_byname: public time_put<_CharT, _OutputIter>
102{
103 char _C_namebuf [32];
104
105public:
106
107 explicit time_put_byname (const char *__name, _RWSTD_SIZE_T __ref = 0)
108 : time_put<_CharT, _OutputIter>(__ref) {
109 this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf);
110 }
111
112 virtual ~time_put_byname () _RWSTD_ATTRIBUTE_NOTHROW;
113};
114
115} // namespace std
116
117
118#if _RWSTD_DEFINE_TEMPLATE_FIRST (_TIME_PUT)
119# include <loc/_time_put.cc>
120#endif // _RWSTD_DEFINE_TEMPLATE_FIRST (_TIME_PUT)
121
122
123#ifdef _RWSTD_MSVC
124# pragma warning (push)
125# pragma warning (disable: 4231)
126#endif // _RWSTD_MSVC
127
128
130
131#if _RWSTD_INSTANTIATE (_TIME_PUT, _CHAR)
132
133_RWSTD_INSTANTIATE_1 (struct _RWSTD_TI_EXPORT time_put<char>);
134
135#endif // _RWSTD_INSTANTIATE (_TIME_PUT, _CHAR)
136
137#if _RWSTD_INSTANTIATE (_TIME_PUT, _WCHAR_T)
138
139_RWSTD_INSTANTIATE_1 (struct _RWSTD_TI_EXPORT time_put<wchar_t>);
140
141#endif // _RWSTD_INSTANTIATE (_TIME_PUT, _WCHAR_T)
142
143} // namespace std
144
145
146#ifdef _RWSTD_MSVC
147# pragma warning (pop)
148#endif // _RWSTD_MSVC
149
150
151#if _RWSTD_DEFINE_TEMPLATE_LAST (_TIME_PUT)
152# include <loc/_time_put.cc>
153#endif // _RWSTD_DEFINE_TEMPLATE_LAST (_TIME_PUT)
154
155
156#endif // _RWSTD_LOC_TIME_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