|
Console Library 8.0.0
A header-only library that makes C++ simple
|
进度条显示配置。 More...
#include <progress.h>
Public Types | |
| using | string_type = std::basic_string<CharT, Traits> |
| using | ostream_type = std::basic_ostream<CharT, Traits> |
Public Member Functions | |
| BasicProgressConfig (ostream_type &o, int w=50, string_type fc=string_type{1, CharT('#')}, string_type ec=string_type{1, CharT('.')}, string_type pre=string_type{1, CharT('[')}, string_type suf=string_type{1, CharT(']')}, bool sp=true) | |
| 构造进度条配置对象。 | |
Public Attributes | |
| ostream_type & | os |
| 输出目标流。 | |
| int | width |
| 进度条的宽度(字符数)。 | |
| string_type | fill_char |
| 已填充部分使用的字符。 | |
| string_type | empty_char |
| 未填充部分使用的字符。 | |
| string_type | prefix |
| 进度条前缀字符串。 | |
| string_type | suffix |
| 进度条后缀字符串。 | |
| bool | show_percent |
| 是否在进度条后显示百分比数字。 | |
进度条显示配置。
| CharT | 字符类型。 |
| Traits | 字符特征类型。 |
该结构体控制进度条的外观和行为,包括输出流、宽度、填充字符、前后缀以及是否显示百分比。
| using console::BasicProgressConfig< CharT, Traits >::ostream_type = std::basic_ostream<CharT, Traits> |
| using console::BasicProgressConfig< CharT, Traits >::string_type = std::basic_string<CharT, Traits> |
|
inline |
构造进度条配置对象。
| o | 输出流。 |
| w | 进度条宽度(字符数),默认为 50。 |
| fc | 填充字符,默认为 "#"。 |
| ec | 空白字符,默认为 "."。 |
| pre | 前缀字符串,默认为 "["。 |
| suf | 后缀字符串,默认为 "]"。 |
| sp | 是否显示百分比,默认为 true。 |
| string_type console::BasicProgressConfig< CharT, Traits >::empty_char |
未填充部分使用的字符。
| string_type console::BasicProgressConfig< CharT, Traits >::fill_char |
已填充部分使用的字符。
| ostream_type& console::BasicProgressConfig< CharT, Traits >::os |
输出目标流。
| string_type console::BasicProgressConfig< CharT, Traits >::prefix |
进度条前缀字符串。
| bool console::BasicProgressConfig< CharT, Traits >::show_percent |
是否在进度条后显示百分比数字。
| string_type console::BasicProgressConfig< CharT, Traits >::suffix |
进度条后缀字符串。
| int console::BasicProgressConfig< CharT, Traits >::width |
进度条的宽度(字符数)。