提供静态全局的输入输出接口绑定与写会话管理 / STDIO interface for read and write ports
More...
#include <stdio.hpp>
|
| template<Print::Text Source, typename... Args> |
| static int | Print (Args &&... args) |
| | 将一个编译期 brace 字面量打印到当前 STDIO 输出 / Print one compile-time brace literal to the active STDIO output
|
| |
| template<Print::Text Source, typename... Args> |
| static int | Printf (Args &&... args) |
| | 将一个编译期 printf 字面量打印到当前 STDIO 输出 / Print one compile-time printf literal to the active STDIO output
|
| |
提供静态全局的输入输出接口绑定与写会话管理 / STDIO interface for read and write ports
Definition at line 20 of file stdio.hpp.
◆ Print()
| static int LibXR::STDIO::Print |
( |
Args &&... | args | ) |
|
|
inlinestatic |
将一个编译期 brace 字面量打印到当前 STDIO 输出 / Print one compile-time brace literal to the active STDIO output
- Template Parameters
-
| Source | 编译期 brace 格式字面量 / Compile-time brace format literal |
| Args | 调用点运行时参数类型列表 / Call-site runtime argument types |
- Parameters
-
| args | 参与本次打印的运行时参数 / Runtime arguments used by the current print |
- Returns
- 返回当前 STDIO 流实际保留并提交的字节数;若会话建立或提交失败则返回
-1 / Returns the byte count actually retained and committed to the current STDIO stream; returns -1 on session or commit failure
Definition at line 227 of file stdio.hpp.
228 {
230 return RunCompiled(format, std::forward<Args>(args)...);
231 }
◆ Printf()
| static int LibXR::STDIO::Printf |
( |
Args &&... | args | ) |
|
|
inlinestatic |
将一个编译期 printf 字面量打印到当前 STDIO 输出 / Print one compile-time printf literal to the active STDIO output
- Template Parameters
-
| Source | 编译期 printf 格式字面量 / Compile-time printf format literal |
| Args | 调用点运行时参数类型列表 / Call-site runtime argument types |
- Parameters
-
| args | 参与本次打印的运行时参数 / Runtime arguments used by the current print |
- Returns
- 返回当前 STDIO 流实际保留并提交的字节数;若会话建立或提交失败则返回
-1 / Returns the byte count actually retained and committed to the current STDIO stream; returns -1 on session or commit failure
Definition at line 244 of file stdio.hpp.
245 {
247 return RunCompiled(format, std::forward<Args>(args)...);
248 }
static consteval Compiled< Source > Build()
在编译期解析并校验 printf 格式串 / Parse and validate a printf format at compile time
◆ read_
读取端口 / Read port instance.
Definition at line 25 of file stdio.hpp.
◆ write_
写入端口 / Write port instance.
Definition at line 26 of file stdio.hpp.
◆ write_mutex_
Initial value:
写入端口互斥锁 / Write port mutex.
Definition at line 27 of file stdio.hpp.
◆ write_stream_
Initial value:
可选的外部托管写流 / Optional externally owned write stream.
Definition at line 29 of file stdio.hpp.
The documentation for this class was generated from the following files: