Migrated IReporterFactory to std::shared_ptr

This commit is contained in:
Phil Nash
2017-04-25 20:28:53 +01:00
parent 338ba6b9ba
commit dd78824697
5 changed files with 16 additions and 13 deletions

View File

@@ -236,15 +236,16 @@ namespace Catch
};
struct IReporterFactory : IShared {
struct IReporterFactory {
virtual ~IReporterFactory();
virtual IStreamingReporter* create( ReporterConfig const& config ) const = 0;
virtual std::string getDescription() const = 0;
};
using IReporterFactoryPtr = std::shared_ptr<IReporterFactory>;
struct IReporterRegistry {
typedef std::map<std::string, Ptr<IReporterFactory> > FactoryMap;
typedef std::vector<Ptr<IReporterFactory> > Listeners;
using FactoryMap = std::map<std::string, IReporterFactoryPtr>;
using Listeners = std::vector<IReporterFactoryPtr>;
virtual ~IReporterRegistry();
virtual IStreamingReporter* create( std::string const& name, IConfigPtr const& config ) const = 0;