tmp/tmpst6nift2/{from.md → to.md}
RENAMED
|
@@ -1,43 +0,0 @@
|
|
| 1 |
-
##### Class `ios_base::Init` <a id="ios::Init">[[ios::Init]]</a>
|
| 2 |
-
|
| 3 |
-
``` cpp
|
| 4 |
-
namespace std {
|
| 5 |
-
class ios_base::Init {
|
| 6 |
-
public:
|
| 7 |
-
Init();
|
| 8 |
-
~Init();
|
| 9 |
-
private:
|
| 10 |
-
static int init_cnt; // exposition only
|
| 11 |
-
};
|
| 12 |
-
}
|
| 13 |
-
```
|
| 14 |
-
|
| 15 |
-
The class `Init` describes an object whose construction ensures the
|
| 16 |
-
construction of the eight objects declared in `<iostream>` (
|
| 17 |
-
[[iostream.objects]]) that associate file stream buffers with the
|
| 18 |
-
standard C streams provided for by the functions declared in
|
| 19 |
-
`<cstdio>` ([[cstdio.syn]]).
|
| 20 |
-
|
| 21 |
-
For the sake of exposition, the maintained data is presented here as:
|
| 22 |
-
|
| 23 |
-
- `static int init_cnt`, counts the number of constructor and destructor
|
| 24 |
-
calls for class `Init`, initialized to zero.
|
| 25 |
-
|
| 26 |
-
``` cpp
|
| 27 |
-
Init();
|
| 28 |
-
```
|
| 29 |
-
|
| 30 |
-
*Effects:* Constructs an object of class `Init`. Constructs and
|
| 31 |
-
initializes the objects `cin`, `cout`, `cerr`, `clog`, `wcin`, `wcout`,
|
| 32 |
-
`wcerr`, and `wclog` if they have not already been constructed and
|
| 33 |
-
initialized.
|
| 34 |
-
|
| 35 |
-
``` cpp
|
| 36 |
-
~Init();
|
| 37 |
-
```
|
| 38 |
-
|
| 39 |
-
*Effects:* Destroys an object of class `Init`. If there are no other
|
| 40 |
-
instances of the class still in existence, calls `cout.flush()`,
|
| 41 |
-
`cerr.flush()`, `clog.flush()`, `wcout.flush()`, `wcerr.flush()`,
|
| 42 |
-
`wclog.flush()`.
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|