Specs
Beautiful C++ Test Framework
Loading...
Searching...
No Matches
SpecsCpp::LocalSpecExceptionHandlerCollection Class Reference

#include <LocalSpecExceptionHandlerCollection.h>

Inheritance diagram for SpecsCpp::LocalSpecExceptionHandlerCollection:
SpecsCpp::ILocalSpecExceptionHandlerCollection

Public Member Functions

void register_exception_handler (ILocalSpecExceptionHandler *handler) override
 
void foreach_exception_handler (ForEachExceptionHandlerFn *fn) const override
 
- Public Member Functions inherited from SpecsCpp::ILocalSpecExceptionHandlerCollection
virtual ~ILocalSpecExceptionHandlerCollection ()=default
 
virtual void register_exception_handler (ILocalSpecExceptionHandler *)=0
 
virtual void foreach_exception_handler (ForEachExceptionHandlerFn *) const =0
 
void foreach (std::function< void(ILocalSpecExceptionHandler *)> fn) const
 

Additional Inherited Members

- Public Types inherited from SpecsCpp::ILocalSpecExceptionHandlerCollection
using ForEachExceptionHandlerFn = IFunctionPointer< void(ILocalSpecExceptionHandler *)>
 

Detailed Description

Definition at line 9 of file LocalSpecExceptionHandlerCollection.h.

Member Function Documentation

◆ foreach_exception_handler()

void SpecsCpp::LocalSpecExceptionHandlerCollection::foreach_exception_handler ( ForEachExceptionHandlerFn fn) const
inlineoverridevirtual

Implements SpecsCpp::ILocalSpecExceptionHandlerCollection.

Definition at line 17 of file LocalSpecExceptionHandlerCollection.h.

17 {
18 for (const auto& handler : _handlers) fn->invoke(handler);
19 }

◆ register_exception_handler()

void SpecsCpp::LocalSpecExceptionHandlerCollection::register_exception_handler ( ILocalSpecExceptionHandler handler)
inlineoverridevirtual

Implements SpecsCpp::ILocalSpecExceptionHandlerCollection.

Definition at line 13 of file LocalSpecExceptionHandlerCollection.h.

13 {
14 _handlers.push_front(handler);
15 }

The documentation for this class was generated from the following file: