Chains multiple FlushPolicy objects together.
More...
#include <FlushPolicies.hpp>
|
| constexpr | FlushPolicyChain (TFlushPolicies ... policies) noexcept(std::is_nothrow_constructible_v< Algorithm_t > &&(std::is_nothrow_move_constructible_v< TFlushPolicies > &&...)) |
| | Constructor. More...
|
| |
| constexpr | FlushPolicyChain (TAlgorithm algorithm, TFlushPolicies ... policies) noexcept(std::is_nothrow_move_constructible_v< Algorithm_t > &&(std::is_nothrow_move_constructible_v< TFlushPolicies > &&...)) |
| | Constructor overload. More...
|
| |
| template<Record TRecord> |
| bool | operator() (const TRecord &record, std::size_t messageByteSize) |
| | Invoke operator. More...
|
| |
| constexpr void | flushed () |
| | Calls flushed on all FlushPolicy objects. More...
|
| |
| constexpr bool | empty () const noexcept |
| | Returns whether the are no FlushPolicy objects attached. More...
|
| |
| constexpr std::size_t | size () const noexcept |
| | Obtains the amount of attached FlushPolicy objects. More...
|
| |
template<class TAlgorithm, class... TFlushPolicies>
class sl::log::FlushPolicyChain< TAlgorithm, TFlushPolicies >
Chains multiple FlushPolicy objects together.
- Template Parameters
-
| TAlgorithm | The used algorithm, which will determine how each invoke result will be treated. |
| TFlushPolicies | Type of provided FlushPolicy objects |
This class simply calls each provided FlushPolicy successively. The provided algorithm will determine, how each invocation result will be treated.
◆ Algorithm_t
template<class TAlgorithm , class... TFlushPolicies>
◆ FlushPolicyChain() [1/2]
template<class TAlgorithm , class... TFlushPolicies>
|
|
inlineexplicitconstexprnoexcept |
◆ FlushPolicyChain() [2/2]
template<class TAlgorithm , class... TFlushPolicies>
|
|
inlineexplicitconstexprnoexcept |
Constructor overload.
- Parameters
-
◆ empty()
template<class TAlgorithm , class... TFlushPolicies>
Returns whether the are no FlushPolicy objects attached.
- Returns
- true if there aren't have any FlushPolicy objects attached.
◆ flushed()
template<class TAlgorithm , class... TFlushPolicies>
◆ operator()()
template<class TAlgorithm , class... TFlushPolicies>
template<Record TRecord>
| bool sl::log::FlushPolicyChain< TAlgorithm, TFlushPolicies >::operator() |
( |
const TRecord & |
record, |
|
|
std::size_t |
messageByteSize |
|
) |
| |
|
inline |
Invoke operator.
- Template Parameters
-
- Parameters
-
| record | The current handled Record object |
| messageByteSize | The size of the current handled message in bytes |
- Returns
- Returns the result of the predicate invocation
Just invokes all internal policies and returns the result of the algorithm
◆ size()
template<class TAlgorithm , class... TFlushPolicies>
The documentation for this class was generated from the following file: