Lines Matching defs:fmt

78 _format_char(std::ostream &out, const T &data, Format &fmt)
87 _format_integer(std::ostream &out, const T &data, Format &fmt)
93 switch (fmt.base) {
107 if (fmt.alternate_form) {
108 if (!fmt.fill_zero)
111 switch (fmt.base) {
114 fmt.width -= 2;
118 fmt.width -= 1;
126 if (fmt.fill_zero)
129 if (fmt.width > 0)
130 out.width(fmt.width);
132 if (fmt.flush_left && !fmt.fill_zero)
135 if (fmt.print_sign)
138 if (fmt.uppercase)
148 _format_float(std::ostream &out, const T &data, Format &fmt)
154 if (fmt.fill_zero)
157 switch (fmt.float_format) {
159 if (fmt.precision != -1) {
160 if (fmt.width > 0)
161 out.width(fmt.width);
163 if (fmt.precision == 0)
164 fmt.precision = 1;
168 out.precision(fmt.precision);
170 if (fmt.width > 0)
171 out.width(fmt.width);
173 if (fmt.uppercase)
178 if (fmt.precision != -1) {
179 if (fmt.width > 0)
180 out.width(fmt.width);
183 out.precision(fmt.precision);
185 if (fmt.width > 0)
186 out.width(fmt.width);
191 if (fmt.precision != -1)
192 out.precision(fmt.precision);
194 if (fmt.width > 0)
195 out.width(fmt.width);
207 _format_string(std::ostream &out, const T &data, Format &fmt)
212 if (fmt.width > 0) {
217 if (fmt.width > flen) {
218 char *spaces = new char[fmt.width - flen + 1];
219 memset(spaces, ' ', fmt.width - flen);
220 spaces[fmt.width - flen] = 0;
222 if (fmt.flush_left)
233 if (fmt.width > 0)
234 out.width(fmt.width);
235 if (fmt.flush_left)
252 format_char(std::ostream &out, const T &data, Format &fmt)
256 format_char(std::ostream &out, char data, Format &fmt)
257 { _format_char(out, data, fmt); }
260 format_char(std::ostream &out, unsigned char data, Format &fmt)
261 { _format_char(out, data, fmt); }
264 format_char(std::ostream &out, signed char data, Format &fmt)
265 { _format_char(out, data, fmt); }
268 format_char(std::ostream &out, short data, Format &fmt)
269 { _format_char(out, (char)data, fmt); }
272 format_char(std::ostream &out, unsigned short data, Format &fmt)
273 { _format_char(out, (char)data, fmt); }
276 format_char(std::ostream &out, int data, Format &fmt)
277 { _format_char(out, (char)data, fmt); }
280 format_char(std::ostream &out, unsigned int data, Format &fmt)
281 { _format_char(out, (char)data, fmt); }
284 format_char(std::ostream &out, long data, Format &fmt)
285 { _format_char(out, (char)data, fmt); }
288 format_char(std::ostream &out, unsigned long data, Format &fmt)
289 { _format_char(out, (char)data, fmt); }
292 format_char(std::ostream &out, long long data, Format &fmt)
293 { _format_char(out, (char)data, fmt); }
296 format_char(std::ostream &out, unsigned long long data, Format &fmt)
297 { _format_char(out, (char)data, fmt); }
304 format_integer(std::ostream &out, const T &data, Format &fmt)
305 { _format_integer(out, data, fmt); }
307 format_integer(std::ostream &out, char data, Format &fmt)
308 { _format_integer(out, (int)data, fmt); }
310 format_integer(std::ostream &out, unsigned char data, Format &fmt)
311 { _format_integer(out, (int)data, fmt); }
313 format_integer(std::ostream &out, signed char data, Format &fmt)
314 { _format_integer(out, (int)data, fmt); }
321 format_float(std::ostream &out, const T &data, Format &fmt)
325 format_float(std::ostream &out, float data, Format &fmt)
326 { _format_float(out, data, fmt); }
329 format_float(std::ostream &out, double data, Format &fmt)
330 { _format_float(out, data, fmt); }
337 format_string(std::ostream &out, const T &data, Format &fmt)
338 { _format_string(out, data, fmt); }