mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 20:27:11 +01:00 
			
		
		
		
	moved impl of hub out into hub_impl - only #included from runner.
This commit is contained in:
		| @@ -1,5 +1,5 @@ | ||||
| /*
 | ||||
|  *  catch_hub.hpp | ||||
|  *  catch_hub.h | ||||
|  *  Test | ||||
|  * | ||||
|  *  Created by Phil on 31/12/2010. | ||||
| @@ -9,8 +9,8 @@ | ||||
|  *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 | ||||
|  * | ||||
|  */ | ||||
| #ifndef TWOBLUECUBES_CATCH_HUB_HPP_INCLUDED | ||||
| #define TWOBLUECUBES_CATCH_HUB_HPP_INCLUDED | ||||
| #ifndef TWOBLUECUBES_CATCH_HUB_H_INCLUDED | ||||
| #define TWOBLUECUBES_CATCH_HUB_H_INCLUDED | ||||
| 
 | ||||
| #include <memory> | ||||
| 
 | ||||
| @@ -38,22 +38,5 @@ namespace Catch | ||||
|         std::auto_ptr<IReporterRegistry> m_reporterRegistry; | ||||
|     }; | ||||
| } | ||||
|      | ||||
|     ////// -- new file --
 | ||||
| 
 | ||||
| #include "catch_reporter_registry.hpp" | ||||
|      | ||||
| namespace Catch | ||||
| { | ||||
|     inline Hub::Hub() | ||||
|     : m_reporterRegistry( new ReporterRegistry ) | ||||
|     { | ||||
|     } | ||||
| 
 | ||||
|     inline IReporterRegistry& Hub::getReporterRegistry() | ||||
|     { | ||||
|         return *me().m_reporterRegistry.get(); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| #endif // TWOBLUECUBES_CATCH_HUB_HPP_INCLUDED
 | ||||
| #endif // TWOBLUECUBES_CATCH_HUB_H_INCLUDED
 | ||||
| @@ -23,8 +23,8 @@ namespace Catch | ||||
|         if( config.listWhat() & RunnerConfig::listReports ) | ||||
|         { | ||||
|             std::cout << "Available reports:\n"; | ||||
|             ReporterRegistry::FactoryMap::const_iterator it = Hub::getReporterRegistry().getFactories().begin(); | ||||
|             ReporterRegistry::FactoryMap::const_iterator itEnd = Hub::getReporterRegistry().getFactories().end(); | ||||
|             IReporterRegistry::FactoryMap::const_iterator it = Hub::getReporterRegistry().getFactories().begin(); | ||||
|             IReporterRegistry::FactoryMap::const_iterator itEnd = Hub::getReporterRegistry().getFactories().end(); | ||||
|             for(; it != itEnd; ++it ) | ||||
|             { | ||||
|                 // !TBD: consider listAs() | ||||
|   | ||||
| @@ -12,7 +12,7 @@ | ||||
| #ifndef TWOBLUECUBES_CATCH_REPORTER_REGISTRARS_HPP_INCLUDED | ||||
| #define TWOBLUECUBES_CATCH_REPORTER_REGISTRARS_HPP_INCLUDED | ||||
|  | ||||
| #include "catch_hub.hpp" | ||||
| #include "catch_hub.h" | ||||
|  | ||||
| namespace Catch | ||||
| {     | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Phil Nash
					Phil Nash