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