Split IReporterRegistry into its own header file

Doing this removes `<map>` from the include set of the base reporter
interface, and thus from bunch more TUs. This provides about 1.5%
improvements in the debug build of the static library, and 1% in
release build.
This commit is contained in:
Martin Hořeňovský 2020-08-23 18:16:10 +02:00
parent ed7eaf2df3
commit 9677df6d8b
No known key found for this signature in database
GPG key ID: DE48307B8B0D381A
10 changed files with 43 additions and 13 deletions

View file

@ -24,7 +24,6 @@
#include <string>
#include <vector>
#include <iosfwd>
#include <map>
namespace Catch {
@ -33,7 +32,6 @@ namespace Catch {
struct TestCaseInfo;
class TestCaseHandle;
struct IConfig;
class Config;
struct ReporterConfig {
explicit ReporterConfig( IConfig const* _fullConfig );
@ -251,16 +249,6 @@ namespace Catch {
};
using IReporterFactoryPtr = Detail::unique_ptr<IReporterFactory>;
struct IReporterRegistry {
using FactoryMap = std::map<std::string, IReporterFactoryPtr>;
using Listeners = std::vector<IReporterFactoryPtr>;
virtual ~IReporterRegistry();
virtual IStreamingReporterPtr create( std::string const& name, IConfig const* config ) const = 0;
virtual FactoryMap const& getFactories() const = 0;
virtual Listeners const& getListeners() const = 0;
};
} // end namespace Catch
#endif // TWOBLUECUBES_CATCH_INTERFACES_REPORTER_H_INCLUDED