Belle II Software development
|
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. | |
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.
|
inline |
Move constructor which will take over the interception state.
Definition at line 312 of file IOIntercept.h.
|
inline |
Finish interception on cleanup.
Definition at line 321 of file IOIntercept.h.
|
private |
pointer to the interceptor we guard
Definition at line 327 of file IOIntercept.h.