MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/TriangleMeshDistance / makeStream

Function makeStream

tests/catch.hpp:11036–11047  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11034 ///////////////////////////////////////////////////////////////////////////
11035
11036 auto makeStream( StringRef const &filename ) -> IStream const* {
11037 if( filename.empty() )
11038 return new detail::CoutStream();
11039 else if( filename[0] == '%' ) {
11040 if( filename == "%debug" )
11041 return new detail::DebugOutStream();
11042 else
11043 CATCH_ERROR( "Unrecognised stream: '" << filename << "'" );
11044 }
11045 else
11046 return new detail::FileStream( filename );
11047 }
11048
11049 // This class encapsulates the idea of a pool of ostringstreams that can be reused.
11050 struct StringStreams {

Callers 1

openStreamMethod · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected