mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +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 Detail
|
||||||
} // namespace Catch
|
} // namespace Catch
|
||||||
|
@ -36,7 +36,8 @@ namespace Catch {
|
|||||||
//! independent on the reporter's concrete type
|
//! independent on the reporter's concrete type
|
||||||
void registerReporterImpl( std::string const& name,
|
void registerReporterImpl( std::string const& name,
|
||||||
IReporterFactoryPtr reporterPtr );
|
IReporterFactoryPtr reporterPtr );
|
||||||
|
//! Actually registers the factory, independent on listener's concrete type
|
||||||
|
void registerListenerImpl( Detail::unique_ptr<EventListenerFactory> listenerFactory );
|
||||||
} // namespace Detail
|
} // namespace Detail
|
||||||
|
|
||||||
class IEventListener;
|
class IEventListener;
|
||||||
@ -97,7 +98,7 @@ namespace Catch {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
ListenerRegistrar(StringRef listenerName) {
|
ListenerRegistrar(StringRef listenerName) {
|
||||||
getMutableRegistryHub().registerListener( Detail::make_unique<TypedListenerFactory>(listenerName) );
|
registerListenerImpl( Detail::make_unique<TypedListenerFactory>(listenerName) );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user