MCPcopy Create free account
hub / github.com/OpenMW/openmw / Buffer

Class Buffer

components/debug/debugging.cpp:293–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

291 };
292
293 class Buffer
294 {
295 public:
296 explicit Buffer(std::size_t capacity, std::deque<Record>& buffer)
297 : mCapacity(capacity)
298 , mBuffer(buffer)
299 {
300 }
301
302 void write(const char* str, std::streamsize size, Level debugLevel)
303 {
304 while (mBuffer.size() >= mCapacity)
305 mBuffer.pop_front();
306 mBuffer.push_back(Record{ std::string(str, size), debugLevel });
307 }
308
309 private:
310 std::size_t mCapacity;
311 std::deque<Record>& mBuffer;
312 };
313
314 template <class First, class Second>
315 class Tee : public DebugOutputBase

Callers 1

wrapApplicationFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected