MCPcopy Create free account
hub / github.com/acl-dev/acl / print

Method print

lib_acl_cpp/src/stdlib/class_counter.cpp:89–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89void class_counter::print(const char *flag) {
90 string buf(2048);
91 string tmp;
92
93 if (lock_) {
94 lock_->lock();
95 }
96
97 std::map<std::string, long long>::const_iterator it = names_.begin();
98 for (; it != names_.end(); ++it) {
99 if (it != names_.begin()) {
100 buf.append(", ");
101 }
102 tmp.format("[%s: %lld]", it->first.c_str(), it->second);
103 buf.append(tmp);
104 }
105
106 if (lock_) {
107 lock_->unlock();
108 }
109
110 if (flag) {
111 logger("class count(%s)=%s", flag, buf.c_str());
112 } else {
113 logger("class count=%s", buf.c_str());
114 }
115}
116
117} // namespace acl

Callers 7

mainMethod · 0.80
mainMethod · 0.80
mainMethod · 0.80
exporting.jsFile · 0.80
exporting.src.jsFile · 0.80
exporting.jsFile · 0.80
attr_clnt_requestFunction · 0.80

Calls 7

beginMethod · 0.80
lockMethod · 0.45
endMethod · 0.45
appendMethod · 0.45
formatMethod · 0.45
c_strMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected