MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / makeStream

Function makeStream

Bcore/src/main/cpp/Dobby/tests/catch.hpp:9404–9414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9402///////////////////////////////////////////////////////////////////////////
9403
9404auto makeStream(StringRef const &filename) -> IStream const * {
9405 if (filename.empty())
9406 return new detail::CoutStream();
9407 else if (filename[0] == '%') {
9408 if (filename == "%debug")
9409 return new detail::DebugOutStream();
9410 else
9411 CATCH_ERROR("Unrecognised stream: '" << filename << "'");
9412 } else
9413 return new detail::FileStream(filename);
9414}
9415
9416// This class encapsulates the idea of a pool of ostringstreams that can be reused.
9417struct StringStreams {

Callers 1

openStreamMethod · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected