mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-22 19:33:29 +01:00
Outline the actual registering of listener factories to cpp file
This commit is contained in:
parent
62167d756e
commit
72f3ce4db5
@ -26,5 +26,10 @@ namespace Catch {
|
||||
}
|
||||
}
|
||||
|
||||
void registerListenerImpl( Detail::unique_ptr<EventListenerFactory> listenerFactory ) {
|
||||
getMutableRegistryHub().registerListener( CATCH_MOVE(listenerFactory) );
|
||||
}
|
||||
|
||||
|
||||
} // namespace Detail
|
||||
} // namespace Catch
|
||||
|
@ -36,7 +36,8 @@ namespace Catch {
|
||||
//! independent on the reporter's concrete type
|
||||
void registerReporterImpl( std::string const& name,
|
||||
IReporterFactoryPtr reporterPtr );
|
||||
|
||||
//! Actually registers the factory, independent on listener's concrete type
|
||||
void registerListenerImpl( Detail::unique_ptr<EventListenerFactory> listenerFactory );
|
||||
} // namespace Detail
|
||||
|
||||
class IEventListener;
|
||||
@ -97,7 +98,7 @@ namespace Catch {
|
||||
|
||||
public:
|
||||
ListenerRegistrar(StringRef listenerName) {
|
||||
getMutableRegistryHub().registerListener( Detail::make_unique<TypedListenerFactory>(listenerName) );
|
||||
registerListenerImpl( Detail::make_unique<TypedListenerFactory>(listenerName) );
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user