tmp/tmp_jt450ml/{from.md → to.md}
RENAMED
|
@@ -3,11 +3,11 @@
|
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
class strstream
|
| 6 |
: public basic_iostream<char> {
|
| 7 |
public:
|
| 8 |
-
//
|
| 9 |
using char_type = char;
|
| 10 |
using int_type = char_traits<char>::int_type;
|
| 11 |
using pos_type = char_traits<char>::pos_type;
|
| 12 |
using off_type = char_traits<char>::off_type;
|
| 13 |
|
|
@@ -15,11 +15,11 @@ namespace std {
|
|
| 15 |
strstream();
|
| 16 |
strstream(char* s, int n,
|
| 17 |
ios_base::openmode mode = ios_base::in|ios_base::out);
|
| 18 |
virtual ~strstream();
|
| 19 |
|
| 20 |
-
//
|
| 21 |
strstreambuf* rdbuf() const;
|
| 22 |
void freeze(bool freezefl = true);
|
| 23 |
int pcount() const;
|
| 24 |
char* str();
|
| 25 |
|
|
@@ -40,21 +40,19 @@ is presented here as:
|
|
| 40 |
|
| 41 |
``` cpp
|
| 42 |
strstream();
|
| 43 |
```
|
| 44 |
|
| 45 |
-
*Effects:*
|
| 46 |
-
base class with `iostream(&sb)`.
|
| 47 |
|
| 48 |
``` cpp
|
| 49 |
strstream(char* s, int n,
|
| 50 |
ios_base::openmode mode = ios_base::in|ios_base::out);
|
| 51 |
```
|
| 52 |
|
| 53 |
-
*Effects:*
|
| 54 |
-
|
| 55 |
-
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
|
|
@@ -73,11 +71,11 @@ virtual ~strstream();
|
|
| 73 |
|
| 74 |
``` cpp
|
| 75 |
strstreambuf* rdbuf() const;
|
| 76 |
```
|
| 77 |
|
| 78 |
-
*Returns:* `&sb`.
|
| 79 |
|
| 80 |
``` cpp
|
| 81 |
void freeze(bool freezefl = true);
|
| 82 |
```
|
| 83 |
|
|
|
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
class strstream
|
| 6 |
: public basic_iostream<char> {
|
| 7 |
public:
|
| 8 |
+
// types
|
| 9 |
using char_type = char;
|
| 10 |
using int_type = char_traits<char>::int_type;
|
| 11 |
using pos_type = char_traits<char>::pos_type;
|
| 12 |
using off_type = char_traits<char>::off_type;
|
| 13 |
|
|
|
|
| 15 |
strstream();
|
| 16 |
strstream(char* s, int n,
|
| 17 |
ios_base::openmode mode = ios_base::in|ios_base::out);
|
| 18 |
virtual ~strstream();
|
| 19 |
|
| 20 |
+
// members
|
| 21 |
strstreambuf* rdbuf() const;
|
| 22 |
void freeze(bool freezefl = true);
|
| 23 |
int pcount() const;
|
| 24 |
char* str();
|
| 25 |
|
|
|
|
| 40 |
|
| 41 |
``` cpp
|
| 42 |
strstream();
|
| 43 |
```
|
| 44 |
|
| 45 |
+
*Effects:* Initializes the base class with `iostream(&sb)`.
|
|
|
|
| 46 |
|
| 47 |
``` cpp
|
| 48 |
strstream(char* s, int n,
|
| 49 |
ios_base::openmode mode = ios_base::in|ios_base::out);
|
| 50 |
```
|
| 51 |
|
| 52 |
+
*Effects:* Initializes the base class with `iostream(&sb)`, and `sb`
|
| 53 |
+
with one of the two constructors:
|
|
|
|
| 54 |
|
| 55 |
- If `(mode & app) == 0`, then `s` shall designate the first element of
|
| 56 |
an array of `n` elements. The constructor is `strstreambuf(s,n,s)`.
|
| 57 |
- If `(mode & app) != 0`, then `s` shall designate the first element of
|
| 58 |
an array of `n` elements that contains an NTBS whose first element is
|
|
|
|
| 71 |
|
| 72 |
``` cpp
|
| 73 |
strstreambuf* rdbuf() const;
|
| 74 |
```
|
| 75 |
|
| 76 |
+
*Returns:* `const_cast<strstreambuf*>(&sb)`.
|
| 77 |
|
| 78 |
``` cpp
|
| 79 |
void freeze(bool freezefl = true);
|
| 80 |
```
|
| 81 |
|