MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / clearCache

Method clearCache

src/openms/source/CONCEPT/LogStream.cpp:172–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170 }
171
172 void LogStreamBuf::clearCache()
173 {
174 // if there are any streams in our list, we
175 // copy the line into that streams, too and flush them
176 map<std::string, LogCacheStruct>::iterator it = log_cache_.begin();
177
178 for (; it != log_cache_.end(); ++it)
179 {
180 if ((it->second).counter != 0)
181 {
182 std::stringstream stream;
183 stream << "<" << it->first << "> occurred " << ++(it->second).counter << " times";
184 distribute_(stream.str());
185 }
186 }
187 // remove all entries from cache
188 log_cache_.clear();
189 log_time_cache_.clear();
190 }
191
192 void LogStreamBuf::distribute_(const std::string& outstring)
193 {

Callers 1

LogStream_test.cppFile · 0.80

Calls 3

beginMethod · 0.45
endMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected