tmp/tmpb_gw5jha/{from.md → to.md}
RENAMED
|
@@ -1,18 +1,18 @@
|
|
| 1 |
-
####
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
-
void register_callback(event_callback fn, int
|
| 5 |
```
|
| 6 |
|
| 7 |
-
*
|
| 8 |
-
`imbue()` ([[ios.base.locales]]), `copyfmt()`, or
|
| 9 |
-
`~ios_base()` ([[ios.base.cons]]), the function `fn` is called with
|
| 10 |
-
argument `index`. Functions registered are called when an event occurs,
|
| 11 |
-
in opposite order of registration. Functions registered while a callback
|
| 12 |
-
function is active are not called until the next event.
|
| 13 |
|
| 14 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
*Remarks:* Identical pairs are not merged. A function registered twice
|
| 17 |
will be called twice.
|
| 18 |
|
|
|
|
| 1 |
+
#### Callbacks <a id="ios.base.callback">[[ios.base.callback]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
+
void register_callback(event_callback fn, int idx);
|
| 5 |
```
|
| 6 |
|
| 7 |
+
*Preconditions:* The function `fn` does not throw exceptions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
+
*Effects:* Registers the pair `(fn, idx)` such that during calls to
|
| 10 |
+
`imbue()` [[ios.base.locales]], `copyfmt()`, or `~ios_base()`
|
| 11 |
+
[[ios.base.cons]], the function `fn` is called with argument `idx`.
|
| 12 |
+
Functions registered are called when an event occurs, in opposite order
|
| 13 |
+
of registration. Functions registered while a callback function is
|
| 14 |
+
active are not called until the next event.
|
| 15 |
|
| 16 |
*Remarks:* Identical pairs are not merged. A function registered twice
|
| 17 |
will be called twice.
|
| 18 |
|