MCPcopy Create free account
hub / github.com/cirquit/trdrop / process

Method process

trdrop_c/trdrop_c/CMDProgressTask.h:45–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43 // interface methods
44 public:
45 void process(cv::Mat & res, size_t currentFrameIndex) {
46 double progress = static_cast<double>(currentFrameIndex) / static_cast<double>(maxIndex);
47 int width = 50;
48 int chars = static_cast<int>(progress * width);
49 int spaces = width - chars;
50
51 std::cout << "Progress: ["
52 << std::string(chars, '#')
53 << std::string(spaces, ' ')
54 << "] "
55 << trdrop::util::string_format("%3.2f", progress * 100)
56 << "%\r"
57 << std::flush;
58 }
59
60 // private member
61 private:

Callers

nothing calls this directly

Calls 1

string_formatFunction · 0.85

Tested by

no test coverage detected