catch_reporter_registry.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. #include "catch_interfaces_reporter.h"
  11. #include <map>
  12. namespace Catch {
  13. class ReporterRegistry : public IReporterRegistry {
  14. public:
  15. ~ReporterRegistry() override;
  16. IStreamingReporterPtr create( std::string const& name, IConfigPtr const& config ) const override;
  17. void registerReporter( std::string const& name, IReporterFactoryPtr const& factory );
  18. void registerListener( IReporterFactoryPtr const& factory );
  19. FactoryMap const& getFactories() const override;
  20. Listeners const& getListeners() const override;
  21. private:
  22. FactoryMap m_factories;
  23. Listeners m_listeners;
  24. };
  25. }
  26. #endif // TWOBLUECUBES_CATCH_REPORTER_REGISTRY_H_INCLUDED