tmp/tmp09xeqkhn/{from.md → to.md}
RENAMED
|
@@ -1,17 +1,17 @@
|
|
| 1 |
-
####
|
| 2 |
|
| 3 |
##### Locales <a id="streambuf.locales">[[streambuf.locales]]</a>
|
| 4 |
|
| 5 |
``` cpp
|
| 6 |
locale pubimbue(const locale& loc);
|
| 7 |
```
|
| 8 |
|
| 9 |
-
*Postconditions:* `loc == getloc()`.
|
| 10 |
-
|
| 11 |
*Effects:* Calls `imbue(loc)`.
|
| 12 |
|
|
|
|
|
|
|
| 13 |
*Returns:* Previous value of `getloc()`.
|
| 14 |
|
| 15 |
``` cpp
|
| 16 |
locale getloc() const;
|
| 17 |
```
|
|
@@ -57,11 +57,11 @@ int pubsync();
|
|
| 57 |
``` cpp
|
| 58 |
streamsize in_avail();
|
| 59 |
```
|
| 60 |
|
| 61 |
*Returns:* If a read position is available, returns `egptr() - gptr()`.
|
| 62 |
-
Otherwise returns `showmanyc()`
|
| 63 |
|
| 64 |
``` cpp
|
| 65 |
int_type snextc();
|
| 66 |
```
|
| 67 |
|
|
@@ -72,11 +72,11 @@ int_type snextc();
|
|
| 72 |
|
| 73 |
``` cpp
|
| 74 |
int_type sbumpc();
|
| 75 |
```
|
| 76 |
|
| 77 |
-
*
|
| 78 |
`uflow()`. Otherwise, returns `traits::to_int_type(*gptr())` and
|
| 79 |
increments the next pointer for the input sequence.
|
| 80 |
|
| 81 |
``` cpp
|
| 82 |
int_type sgetc();
|
|
@@ -95,31 +95,31 @@ streamsize sgetn(char_type* s, streamsize n);
|
|
| 95 |
|
| 96 |
``` cpp
|
| 97 |
int_type sputbackc(char_type c);
|
| 98 |
```
|
| 99 |
|
| 100 |
-
*
|
| 101 |
if `traits::eq(c, gptr()[-1])` is `false`, returns
|
| 102 |
`pbackfail(traits::to_int_type(c))`. Otherwise, decrements the next
|
| 103 |
pointer for the input sequence and returns
|
| 104 |
`traits::to_int_type(*gptr())`.
|
| 105 |
|
| 106 |
``` cpp
|
| 107 |
int_type sungetc();
|
| 108 |
```
|
| 109 |
|
| 110 |
-
*
|
| 111 |
returns `pbackfail()`. Otherwise, decrements the next pointer for the
|
| 112 |
input sequence and returns `traits::to_int_type(*gptr())`.
|
| 113 |
|
| 114 |
##### Put area <a id="streambuf.pub.put">[[streambuf.pub.put]]</a>
|
| 115 |
|
| 116 |
``` cpp
|
| 117 |
int_type sputc(char_type c);
|
| 118 |
```
|
| 119 |
|
| 120 |
-
*
|
| 121 |
returns `overflow(traits::to_int_type(c))`. Otherwise, stores `c` at the
|
| 122 |
next pointer for the output sequence, increments the pointer, and
|
| 123 |
returns `traits::to_int_type(c)`.
|
| 124 |
|
| 125 |
``` cpp
|
|
|
|
| 1 |
+
#### Public member functions <a id="streambuf.members">[[streambuf.members]]</a>
|
| 2 |
|
| 3 |
##### Locales <a id="streambuf.locales">[[streambuf.locales]]</a>
|
| 4 |
|
| 5 |
``` cpp
|
| 6 |
locale pubimbue(const locale& loc);
|
| 7 |
```
|
| 8 |
|
|
|
|
|
|
|
| 9 |
*Effects:* Calls `imbue(loc)`.
|
| 10 |
|
| 11 |
+
*Ensures:* `loc == getloc()`.
|
| 12 |
+
|
| 13 |
*Returns:* Previous value of `getloc()`.
|
| 14 |
|
| 15 |
``` cpp
|
| 16 |
locale getloc() const;
|
| 17 |
```
|
|
|
|
| 57 |
``` cpp
|
| 58 |
streamsize in_avail();
|
| 59 |
```
|
| 60 |
|
| 61 |
*Returns:* If a read position is available, returns `egptr() - gptr()`.
|
| 62 |
+
Otherwise returns `showmanyc()` [[streambuf.virt.get]].
|
| 63 |
|
| 64 |
``` cpp
|
| 65 |
int_type snextc();
|
| 66 |
```
|
| 67 |
|
|
|
|
| 72 |
|
| 73 |
``` cpp
|
| 74 |
int_type sbumpc();
|
| 75 |
```
|
| 76 |
|
| 77 |
+
*Effects:* If the input sequence read position is not available, returns
|
| 78 |
`uflow()`. Otherwise, returns `traits::to_int_type(*gptr())` and
|
| 79 |
increments the next pointer for the input sequence.
|
| 80 |
|
| 81 |
``` cpp
|
| 82 |
int_type sgetc();
|
|
|
|
| 95 |
|
| 96 |
``` cpp
|
| 97 |
int_type sputbackc(char_type c);
|
| 98 |
```
|
| 99 |
|
| 100 |
+
*Effects:* If the input sequence putback position is not available, or
|
| 101 |
if `traits::eq(c, gptr()[-1])` is `false`, returns
|
| 102 |
`pbackfail(traits::to_int_type(c))`. Otherwise, decrements the next
|
| 103 |
pointer for the input sequence and returns
|
| 104 |
`traits::to_int_type(*gptr())`.
|
| 105 |
|
| 106 |
``` cpp
|
| 107 |
int_type sungetc();
|
| 108 |
```
|
| 109 |
|
| 110 |
+
*Effects:* If the input sequence putback position is not available,
|
| 111 |
returns `pbackfail()`. Otherwise, decrements the next pointer for the
|
| 112 |
input sequence and returns `traits::to_int_type(*gptr())`.
|
| 113 |
|
| 114 |
##### Put area <a id="streambuf.pub.put">[[streambuf.pub.put]]</a>
|
| 115 |
|
| 116 |
``` cpp
|
| 117 |
int_type sputc(char_type c);
|
| 118 |
```
|
| 119 |
|
| 120 |
+
*Effects:* If the output sequence write position is not available,
|
| 121 |
returns `overflow(traits::to_int_type(c))`. Otherwise, stores `c` at the
|
| 122 |
next pointer for the output sequence, increments the pointer, and
|
| 123 |
returns `traits::to_int_type(c)`.
|
| 124 |
|
| 125 |
``` cpp
|