1 /*
2  *  Created by Phil on 29/10/2010.
3  *  Copyright 2010 Two Blue Cubes Ltd. All rights reserved.
4  *
5  *  Distributed under the Boost Software License, Version 1.0. (See accompanying
6  *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7  */
8 #ifndef TWOBLUECUBES_CATCH_REPORTER_REGISTRY_H_INCLUDED
9 #define TWOBLUECUBES_CATCH_REPORTER_REGISTRY_H_INCLUDED
10 
11 #include "catch_interfaces_reporter.h"
12 
13 #include <map>
14 
15 namespace Catch {
16 
17     class ReporterRegistry : public IReporterRegistry {
18 
19     public:
20 
21         ~ReporterRegistry() override;
22 
23         IStreamingReporterPtr create( std::string const& name, IConfigPtr const& config ) const override;
24 
25         void registerReporter( std::string const& name, IReporterFactoryPtr const& factory );
26         void registerListener( IReporterFactoryPtr const& factory );
27 
28         FactoryMap const& getFactories() const override;
29         Listeners const& getListeners() const override;
30 
31     private:
32         FactoryMap m_factories;
33         Listeners m_listeners;
34     };
35 }
36 
37 #endif // TWOBLUECUBES_CATCH_REPORTER_REGISTRY_H_INCLUDED
38