File indexing completed on 2025-01-18 09:54:04
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef CATCH_INTERFACES_REPORTER_FACTORY_HPP_INCLUDED
0009 #define CATCH_INTERFACES_REPORTER_FACTORY_HPP_INCLUDED
0010
0011 #include <catch2/internal/catch_unique_ptr.hpp>
0012 #include <catch2/internal/catch_stringref.hpp>
0013
0014 #include <string>
0015
0016 namespace Catch {
0017
0018 struct ReporterConfig;
0019 class IConfig;
0020 class IEventListener;
0021 using IEventListenerPtr = Detail::unique_ptr<IEventListener>;
0022
0023
0024 class IReporterFactory {
0025 public:
0026 virtual ~IReporterFactory();
0027
0028 virtual IEventListenerPtr
0029 create( ReporterConfig&& config ) const = 0;
0030 virtual std::string getDescription() const = 0;
0031 };
0032 using IReporterFactoryPtr = Detail::unique_ptr<IReporterFactory>;
0033
0034 class EventListenerFactory {
0035 public:
0036 virtual ~EventListenerFactory();
0037 virtual IEventListenerPtr create( IConfig const* config ) const = 0;
0038
0039 virtual StringRef getName() const = 0;
0040
0041 virtual std::string getDescription() const = 0;
0042 };
0043 }
0044
0045 #endif