tmp/tmp_5dxjb6j/{from.md → to.md}
RENAMED
|
@@ -1,78 +0,0 @@
|
|
| 1 |
-
### Class `ostrstream` <a id="depr.ostrstream">[[depr.ostrstream]]</a>
|
| 2 |
-
|
| 3 |
-
#### General <a id="depr.ostrstream.general">[[depr.ostrstream.general]]</a>
|
| 4 |
-
|
| 5 |
-
``` cpp
|
| 6 |
-
namespace std {
|
| 7 |
-
class ostrstream : public basic_ostream<char> {
|
| 8 |
-
public:
|
| 9 |
-
ostrstream();
|
| 10 |
-
ostrstream(char* s, int n, ios_base::openmode mode = ios_base::out);
|
| 11 |
-
virtual ~ostrstream();
|
| 12 |
-
|
| 13 |
-
strstreambuf* rdbuf() const;
|
| 14 |
-
void freeze(bool freezefl = true);
|
| 15 |
-
char* str();
|
| 16 |
-
int pcount() const;
|
| 17 |
-
private:
|
| 18 |
-
strstreambuf sb; // exposition only
|
| 19 |
-
};
|
| 20 |
-
}
|
| 21 |
-
```
|
| 22 |
-
|
| 23 |
-
The class `ostrstream` supports the writing of objects of class
|
| 24 |
-
`strstreambuf`. It supplies a `strstreambuf` object to control the
|
| 25 |
-
associated array object. For the sake of exposition, the maintained data
|
| 26 |
-
is presented here as:
|
| 27 |
-
|
| 28 |
-
- `sb`, the `strstreambuf` object.
|
| 29 |
-
|
| 30 |
-
#### `ostrstream` constructors <a id="depr.ostrstream.cons">[[depr.ostrstream.cons]]</a>
|
| 31 |
-
|
| 32 |
-
``` cpp
|
| 33 |
-
ostrstream();
|
| 34 |
-
```
|
| 35 |
-
|
| 36 |
-
*Effects:* Initializes the base class with `ostream(&sb)` and `sb` with
|
| 37 |
-
`strstreambuf()`.
|
| 38 |
-
|
| 39 |
-
``` cpp
|
| 40 |
-
ostrstream(char* s, int n, ios_base::openmode mode = ios_base::out);
|
| 41 |
-
```
|
| 42 |
-
|
| 43 |
-
*Effects:* Initializes the base class with `ostream(&sb)`, and `sb` with
|
| 44 |
-
one of two constructors:
|
| 45 |
-
|
| 46 |
-
- If `(mode & app) == 0`, then `s` shall designate the first element of
|
| 47 |
-
an array of `n` elements. The constructor is `strstreambuf(s, n, s)`.
|
| 48 |
-
- If `(mode & app) != 0`, then `s` shall designate the first element of
|
| 49 |
-
an array of `n` elements that contains an NTBS whose first element is
|
| 50 |
-
designated by `s`. The constructor is
|
| 51 |
-
`strstreambuf(s, n, s + std::strlen(s))`.[^2]
|
| 52 |
-
|
| 53 |
-
#### Member functions <a id="depr.ostrstream.members">[[depr.ostrstream.members]]</a>
|
| 54 |
-
|
| 55 |
-
``` cpp
|
| 56 |
-
strstreambuf* rdbuf() const;
|
| 57 |
-
```
|
| 58 |
-
|
| 59 |
-
*Returns:* `(strstreambuf*)&sb`.
|
| 60 |
-
|
| 61 |
-
``` cpp
|
| 62 |
-
void freeze(bool freezefl = true);
|
| 63 |
-
```
|
| 64 |
-
|
| 65 |
-
*Effects:* Calls `rdbuf()->freeze(freezefl)`.
|
| 66 |
-
|
| 67 |
-
``` cpp
|
| 68 |
-
char* str();
|
| 69 |
-
```
|
| 70 |
-
|
| 71 |
-
*Returns:* `rdbuf()->str()`.
|
| 72 |
-
|
| 73 |
-
``` cpp
|
| 74 |
-
int pcount() const;
|
| 75 |
-
```
|
| 76 |
-
|
| 77 |
-
*Returns:* `rdbuf()->pcount()`.
|
| 78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|