142 lines
3.4 KiB
Markdown
142 lines
3.4 KiB
Markdown
[fmtflags.state]
|
|
|
|
# 31 Input/output library [[input.output]](./#input.output)
|
|
|
|
## 31.5 Iostreams base classes [[iostreams.base]](iostreams.base#fmtflags.state)
|
|
|
|
### 31.5.2 Class ios_base [[ios.base]](ios.base#fmtflags.state)
|
|
|
|
#### 31.5.2.3 State functions [fmtflags.state]
|
|
|
|
[ð](#lib:flags,ios_base)
|
|
|
|
`fmtflags flags() const;
|
|
`
|
|
|
|
[1](#1)
|
|
|
|
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L1188)
|
|
|
|
*Returns*: The format control information for both input and output[.](#1.sentence-1)
|
|
|
|
[ð](#lib:flags,ios_base_)
|
|
|
|
`fmtflags flags(fmtflags fmtfl);
|
|
`
|
|
|
|
[2](#2)
|
|
|
|
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L1199)
|
|
|
|
*Postconditions*: fmtfl == flags()[.](#2.sentence-1)
|
|
|
|
[3](#3)
|
|
|
|
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L1203)
|
|
|
|
*Returns*: The previous value offlags()[.](#3.sentence-1)
|
|
|
|
[ð](#lib:setf,ios_base)
|
|
|
|
`fmtflags setf(fmtflags fmtfl);
|
|
`
|
|
|
|
[4](#4)
|
|
|
|
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L1215)
|
|
|
|
*Effects*: Sets fmtfl inflags()[.](#4.sentence-1)
|
|
|
|
[5](#5)
|
|
|
|
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L1220)
|
|
|
|
*Returns*: The previous value offlags()[.](#5.sentence-1)
|
|
|
|
[ð](#lib:setf,ios_base_)
|
|
|
|
`fmtflags setf(fmtflags fmtfl, fmtflags mask);
|
|
`
|
|
|
|
[6](#6)
|
|
|
|
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L1232)
|
|
|
|
*Effects*: Clears mask inflags(),
|
|
setsfmtfl & mask inflags()[.](#6.sentence-1)
|
|
|
|
[7](#7)
|
|
|
|
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L1241)
|
|
|
|
*Returns*: The previous value offlags()[.](#7.sentence-1)
|
|
|
|
[ð](#lib:unsetf,ios_base)
|
|
|
|
`void unsetf(fmtflags mask);
|
|
`
|
|
|
|
[8](#8)
|
|
|
|
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L1253)
|
|
|
|
*Effects*: Clears mask inflags()[.](#8.sentence-1)
|
|
|
|
[ð](#lib:precision,ios_base)
|
|
|
|
`streamsize precision() const;
|
|
`
|
|
|
|
[9](#9)
|
|
|
|
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L1265)
|
|
|
|
*Returns*: The precision
|
|
to generate on certain output conversions[.](#9.sentence-1)
|
|
|
|
[ð](#lib:precision,ios_base_)
|
|
|
|
`streamsize precision(streamsize prec);
|
|
`
|
|
|
|
[10](#10)
|
|
|
|
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L1277)
|
|
|
|
*Postconditions*: prec == precision()[.](#10.sentence-1)
|
|
|
|
[11](#11)
|
|
|
|
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L1281)
|
|
|
|
*Returns*: The previous value ofprecision()[.](#11.sentence-1)
|
|
|
|
[ð](#lib:width,ios_base)
|
|
|
|
`streamsize width() const;
|
|
`
|
|
|
|
[12](#12)
|
|
|
|
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L1293)
|
|
|
|
*Returns*: The minimum field width (number of characters) to generate on certain output
|
|
conversions[.](#12.sentence-1)
|
|
|
|
[ð](#lib:width,ios_base_)
|
|
|
|
`streamsize width(streamsize wide);
|
|
`
|
|
|
|
[13](#13)
|
|
|
|
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L1305)
|
|
|
|
*Postconditions*: wide == width()[.](#13.sentence-1)
|
|
|
|
[14](#14)
|
|
|
|
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L1309)
|
|
|
|
*Returns*: The previous value ofwidth()[.](#14.sentence-1)
|