Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
catch_interfaces_registry_hub.h
Go to the documentation of this file.
1/*
2 * Created by Phil on 5/8/2012.
3 * Copyright 2012 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_INTERFACES_REGISTRY_HUB_H_INCLUDED
9#define TWOBLUECUBES_CATCH_INTERFACES_REGISTRY_HUB_H_INCLUDED
10
11#include "catch_common.h"
12
13#include <string>
14#include <memory>
15
16namespace Catch {
17
18 class TestCase;
19 struct ITestCaseRegistry;
20 struct IExceptionTranslatorRegistry;
21 struct IExceptionTranslator;
22 struct IReporterRegistry;
23 struct IReporterFactory;
24 struct ITagAliasRegistry;
25 struct IMutableEnumValuesRegistry;
26
27 class StartupExceptionRegistry;
28
29 using IReporterFactoryPtr = std::shared_ptr<IReporterFactory>;
30
31 struct IRegistryHub {
32 virtual ~IRegistryHub();
33
34 virtual IReporterRegistry const& getReporterRegistry() const = 0;
35 virtual ITestCaseRegistry const& getTestCaseRegistry() const = 0;
36 virtual ITagAliasRegistry const& getTagAliasRegistry() const = 0;
38
39
41 };
42
43 struct IMutableRegistryHub {
45 virtual void registerReporter( std::string const& name, IReporterFactoryPtr const& factory ) = 0;
46 virtual void registerListener( IReporterFactoryPtr const& factory ) = 0;
47 virtual void registerTest( TestCase const& testInfo ) = 0;
48 virtual void registerTranslator( const IExceptionTranslator* translator ) = 0;
49 virtual void registerTagAlias( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) = 0;
50 virtual void registerStartupException() noexcept = 0;
52 };
53
56 void cleanUp();
58
59}
60
61#endif // TWOBLUECUBES_CATCH_INTERFACES_REGISTRY_HUB_H_INCLUDED
std::string name
IMutableRegistryHub & getMutableRegistryHub()
IRegistryHub const & getRegistryHub()
std::shared_ptr< IReporterFactory > IReporterFactoryPtr
std::string translateActiveException()
Definition name.hpp:106
virtual void registerTest(TestCase const &testInfo)=0
virtual void registerReporter(std::string const &name, IReporterFactoryPtr const &factory)=0
virtual void registerStartupException() noexcept=0
virtual IMutableEnumValuesRegistry & getMutableEnumValuesRegistry()=0
virtual void registerListener(IReporterFactoryPtr const &factory)=0
virtual void registerTagAlias(std::string const &alias, std::string const &tag, SourceLineInfo const &lineInfo)=0
virtual void registerTranslator(const IExceptionTranslator *translator)=0
virtual ITestCaseRegistry const & getTestCaseRegistry() const =0
virtual ITagAliasRegistry const & getTagAliasRegistry() const =0
virtual ~IRegistryHub()
virtual StartupExceptionRegistry const & getStartupExceptionRegistry() const =0
virtual IExceptionTranslatorRegistry const & getExceptionTranslatorRegistry() const =0
virtual IReporterRegistry const & getReporterRegistry() const =0