std::ios_base:: event_callback
From cppreference.net
C++
Input/output library
| I/O manipulators | ||||
| Print functions (C++23) | ||||
| C-style I/O | ||||
| Buffers | ||||
|
(C++23)
|
||||
|
(
C++98/26*
)
|
||||
|
(C++20)
|
||||
| Streams | ||||
| Abstractions | ||||
| File I/O | ||||
| String I/O | ||||
| Array I/O | ||||
|
(C++23)
|
||||
|
(C++23)
|
||||
|
(C++23)
|
||||
|
(
C++98/26*
)
|
||||
|
(
C++98/26*
)
|
||||
|
(
C++98/26*
)
|
||||
| Synchronized Output | ||||
|
(C++20)
|
||||
| Types | ||||
| Error category interface | ||||
|
(C++11)
|
||||
|
(C++11)
|
std::ios_base
| Member functions | ||||
| Formatting | ||||
| Locales | ||||
| Internal extensible array | ||||
| Miscellaneous | ||||
| Member classes | ||||
| Member types | ||||
|
ios_base::event_callback
|
|
typedef
void
(
*
event_callback
)
(
event type, ios_base
&
ios,
int
index
)
;
|
||
可通过 register_callback() 注册的函数回调类型,用于在特定事件发生时被调用。
type 是一个类型为 ios_base::event 的值,用于指示将调用此回调函数的事件类型。
ios 指代调用回调的流对象:当由 std::ios_base 和 std::basic_ios 成员函数调用回调时, * this 会作为参数传递。
index 是用户调用 register_callback() 注册函数时传入的数值参数。
参见
|
复制格式化信息
(std::basic_ios<CharT,Traits> 的公开成员函数) |
|
|
设置区域设置
(公开成员函数) |
|
|
[virtual]
|
销毁对象
(虚公开成员函数) |
|
注册事件回调函数
(公开成员函数) |