hsweif / cpp-logger

An implementation of logger, status bar, etc. in C++. To let me easier print out information in C++.
Apache License 2.0
1 stars 0 forks source link

可以把 progress bar API 做成像 python tqdm 一樣包在 loop iterator 上 #2

Closed moshiba closed 4 years ago

moshiba commented 5 years ago

除了原本的手動 update() 之外,若是能做成一個 iterator wrapper 應該是挺不錯的, 直接放在迴圈內就能預設綁定 max_num 跟迴圈大小,又不會失去手動調整的彈性

我想的是 python 上的 tqdm package 這樣的一個介面

moshiba commented 5 years ago

不過這個東西在 c++ 上實作若要保有簡單易用的介面, 在使用的時候可能要搭配 c++14 推出的 auto placeholder type specifier

moshiba commented 5 years ago

是說名叫 progress bar 他的 bar 卻總不 progress 有點不習慣 有沒有什麼實作規劃讓我來發個 PR 吧

moshiba commented 5 years ago

possible implementation demonstrated in the official tqdm c++ porting (the project is pretty much dead now, the only feature implemented inside is this iterator wrapper)

moshiba commented 4 years ago

我把 progress bar 的部分搬出去了,留下 logger 在 cpp-logger 裡面