Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
Catch::ReporterRegistry Class Reference

#include <catch_reporter_registry.h>

Inheritance diagram for Catch::ReporterRegistry:
Collaboration diagram for Catch::ReporterRegistry:

Public Member Functions

 ~ReporterRegistry () override
 
IStreamingReporterPtr create (std::string const &name, IConfigPtr const &config) const override
 
void registerReporter (std::string const &name, IReporterFactoryPtr const &factory)
 
void registerListener (IReporterFactoryPtr const &factory)
 
FactoryMap const & getFactories () const override
 
Listeners const & getListeners () const override
 
- Public Member Functions inherited from Catch::IReporterRegistry
virtual ~IReporterRegistry ()
 

Additional Inherited Members

- Public Types inherited from Catch::IReporterRegistry
using FactoryMap = std::map<std::string, IReporterFactoryPtr>
 
using Listeners = std::vector<IReporterFactoryPtr>
 

Detailed Description

Definition at line 17 of file catch_reporter_registry.h.

Constructor & Destructor Documentation

◆ ~ReporterRegistry()

Catch::ReporterRegistry::~ReporterRegistry ( )
overridedefault

Member Function Documentation

◆ create()

IStreamingReporterPtr Catch::ReporterRegistry::create ( std::string const & name,
IConfigPtr const & config ) const
overridevirtual

Implements Catch::IReporterRegistry.

Definition at line 13 of file catch_reporter_registry.cpp.

13 {
14 auto it = m_factories.find( name );
15 if( it == m_factories.end() )
16 return nullptr;
17 return it->second->create( ReporterConfig( config ) );
18 }
std::string name

◆ getFactories()

IReporterRegistry::FactoryMap const & Catch::ReporterRegistry::getFactories ( ) const
overridevirtual

Implements Catch::IReporterRegistry.

Definition at line 27 of file catch_reporter_registry.cpp.

27 {
28 return m_factories;
29 }

◆ getListeners()

IReporterRegistry::Listeners const & Catch::ReporterRegistry::getListeners ( ) const
overridevirtual

Implements Catch::IReporterRegistry.

Definition at line 30 of file catch_reporter_registry.cpp.

30 {
31 return m_listeners;
32 }

◆ registerListener()

void Catch::ReporterRegistry::registerListener ( IReporterFactoryPtr const & factory)

Definition at line 23 of file catch_reporter_registry.cpp.

23 {
24 m_listeners.push_back( factory );
25 }

◆ registerReporter()

void Catch::ReporterRegistry::registerReporter ( std::string const & name,
IReporterFactoryPtr const & factory )

Definition at line 20 of file catch_reporter_registry.cpp.

20 {
21 m_factories.emplace(name, factory);
22 }

The documentation for this class was generated from the following files: