MCPcopy Create free account
hub / github.com/apache/thrift / addReporter

Function addReporter

compiler/cpp/tests/catch/catch.hpp:9409–9428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9407};
9408
9409Ptr<IStreamingReporter> addReporter( Ptr<IStreamingReporter> const& existingReporter, Ptr<IStreamingReporter> const& additionalReporter ) {
9410 Ptr<IStreamingReporter> resultingReporter;
9411
9412 if( existingReporter ) {
9413 MultipleReporters* multi = existingReporter->tryAsMulti();
9414 if( !multi ) {
9415 multi = new MultipleReporters;
9416 resultingReporter = Ptr<IStreamingReporter>( multi );
9417 if( existingReporter )
9418 multi->add( existingReporter );
9419 }
9420 else
9421 resultingReporter = existingReporter;
9422 multi->add( additionalReporter );
9423 }
9424 else
9425 resultingReporter = additionalReporter;
9426
9427 return resultingReporter;
9428}
9429
9430} // end namespace Catch
9431

Callers 2

makeReporterFunction · 0.85
addListenersFunction · 0.85

Calls 2

tryAsMultiMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected