![]() |
Belle II Software
release-08-02-04
|
Simple RAII guard for output interceptor. More...
#include <IOIntercept.h>
Public Member Functions | |
| InterceptorScopeGuard (T &interceptor) | |
| Construct a new instance for a given interceptor object and start intercepting io. More... | |
| InterceptorScopeGuard (InterceptorScopeGuard< T > &&b) | |
| Move constructor which will take over the interception state. | |
| InterceptorScopeGuard (const InterceptorScopeGuard< T > &)=delete | |
| We don't want copying. | |
| InterceptorScopeGuard & | operator= (const InterceptorScopeGuard &)=delete |
| Also no assignment. | |
| ~InterceptorScopeGuard () | |
| Finish interception on cleanup. | |
Private Attributes | |
| T * | m_interceptor |
| pointer to the interceptor we guard | |
Simple RAII guard for output interceptor.
In case you have one of the IOIntercept classes as member and want to enable it in a function with multiple return paths this class makes sure that the interceptor is properly finished on exiting the function/scope.
Definition at line 301 of file IOIntercept.h.
|
inlineexplicit |
Construct a new instance for a given interceptor object and start intercepting io.
| interceptor | the interceptor object to use, must stay valid during the lifetime of this object. |
Definition at line 307 of file IOIntercept.h.