Simple-Log
alpha-v0.7
|
Wrapper class which disables Sinks on construction and enables them on destruction. More...
#include <ISink.hpp>
Public Member Functions | |
ScopedSinkDisabling (TSink &sink) noexcept | |
Constructor which disables passed sink. More... | |
~ScopedSinkDisabling () noexcept | |
Constructor which enables passed sink. More... | |
ScopedSinkDisabling (const ScopedSinkDisabling &)=delete | |
Deleted copy constructor. More... | |
ScopedSinkDisabling & | operator= (const ScopedSinkDisabling &)=delete |
Deleted copy-assign operator. More... | |
ScopedSinkDisabling (ScopedSinkDisabling &&other) noexcept | |
Move constructor. More... | |
ScopedSinkDisabling & | operator= (ScopedSinkDisabling &&other) noexcept |
Move-assign operator. More... | |
TSink & | operator* () const noexcept |
Dereferencing operator. More... | |
TSink * | operator-> () const noexcept |
Dereferencing operator. More... | |
TSink * | get () const noexcept |
Returns a pointer to the Sink instance. More... | |
Wrapper class which disables Sinks on construction and enables them on destruction.
TRecord | Record type |
TSink | Sink type |
This helper class is useful when you want to get sure, that your Sinks will be finally setup before they are going to handle any records. Instances of this class are movable but not copyable.
|
inlineexplicitnoexcept |
Constructor which disables passed sink.
sink |
|
inlinenoexcept |
Constructor which enables passed sink.
|
delete |
Deleted copy constructor.
|
inlinenoexcept |
Move constructor.
|
inlinenoexcept |
Returns a pointer to the Sink instance.
|
inlinenoexcept |
Dereferencing operator.
|
inlinenoexcept |
Dereferencing operator.
|
delete |
Deleted copy-assign operator.
|
inlinenoexcept |
Move-assign operator.