MCPcopy Create free account
hub / github.com/Profactor/cv-plot / makeStream

Function makeStream

CvPlot/ext/catch2/inc/catch.hpp:13503–13514  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13501 ///////////////////////////////////////////////////////////////////////////
13502
13503 auto makeStream( StringRef const &filename ) -> IStream const* {
13504 if( filename.empty() )
13505 return new Detail::CoutStream();
13506 else if( filename[0] == '%' ) {
13507 if( filename == "%debug" )
13508 return new Detail::DebugOutStream();
13509 else
13510 CATCH_ERROR( "Unrecognised stream: '" << filename << "'" );
13511 }
13512 else
13513 return new Detail::FileStream( filename );
13514 }
13515
13516 // This class encapsulates the idea of a pool of ostringstreams that can be reused.
13517 struct StringStreams {

Callers 1

openStreamMethod · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected