MCPcopy Create free account
hub / github.com/FidoProject/Fido / addReporter

Function addReporter

tests/catch.h:8496–8515  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8494};
8495
8496Ptr<IStreamingReporter> addReporter( Ptr<IStreamingReporter> const& existingReporter, Ptr<IStreamingReporter> const& additionalReporter ) {
8497 Ptr<IStreamingReporter> resultingReporter;
8498
8499 if( existingReporter ) {
8500 MultipleReporters* multi = dynamic_cast<MultipleReporters*>( existingReporter.get() );
8501 if( !multi ) {
8502 multi = new MultipleReporters;
8503 resultingReporter = Ptr<IStreamingReporter>( multi );
8504 if( existingReporter )
8505 multi->add( existingReporter );
8506 }
8507 else
8508 resultingReporter = existingReporter;
8509 multi->add( additionalReporter );
8510 }
8511 else
8512 resultingReporter = additionalReporter;
8513
8514 return resultingReporter;
8515}
8516
8517} // end namespace Catch
8518

Callers 2

makeReporterFunction · 0.85
addListenersFunction · 0.85

Calls 2

getMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected