Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
catch_reporter_registry.cpp
Go to the documentation of this file.
1/*
2 * Created by Martin on 31/08/2017.
3 *
4 * Distributed under the Boost Software License, Version 1.0. (See accompanying
5 * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 */
8
9namespace Catch {
10
12
14 auto it = m_factories.find( name );
15 if( it == m_factories.end() )
16 return nullptr;
17 return it->second->create( ReporterConfig( config ) );
18 }
19
20 void ReporterRegistry::registerReporter( std::string const& name, IReporterFactoryPtr const& factory ) {
21 m_factories.emplace(name, factory);
22 }
24 m_listeners.push_back( factory );
25 }
26
28 return m_factories;
29 }
31 return m_listeners;
32 }
33
34}
std::string name
Listeners const & getListeners() const override
~ReporterRegistry() override
void registerListener(IReporterFactoryPtr const &factory)
void registerReporter(std::string const &name, IReporterFactoryPtr const &factory)
IStreamingReporterPtr create(std::string const &name, IConfigPtr const &config) const override
FactoryMap const & getFactories() const override
std::unique_ptr< IStreamingReporter > IStreamingReporterPtr
std::shared_ptr< IReporterFactory > IReporterFactoryPtr
std::shared_ptr< IConfig const > IConfigPtr
std::map< std::string, IReporterFactoryPtr > FactoryMap
std::vector< IReporterFactoryPtr > Listeners