Simple-Log  alpha-v0.7
sl::log::FlushPolicyNoneOf< TFlushPolicies > Class Template Reference

Convenience type for chaining multiple FlushPolicies with NOR. More...

#include <FlushPolicies.hpp>

Inheritance diagram for sl::log::FlushPolicyNoneOf< TFlushPolicies >:
sl::log::FlushPolicyChain< detail::TupleNoneOf, TFlushPolicies... >

Public Member Functions

constexpr FlushPolicyNoneOf (TFlushPolicies ... policies) noexcept((std::is_nothrow_move_constructible_v< TFlushPolicies > &&...))
 Constructor. More...
 
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...
 

Detailed Description

template<class... TFlushPolicies>
class sl::log::FlushPolicyNoneOf< TFlushPolicies >

Convenience type for chaining multiple FlushPolicies with NOR.

Template Parameters
TFlushPoliciesType of provided FlushPolicy objects

Constructor & Destructor Documentation

◆ FlushPolicyNoneOf()

template<class... TFlushPolicies>
constexpr sl::log::FlushPolicyNoneOf< TFlushPolicies >::FlushPolicyNoneOf ( TFlushPolicies ...  policies)
inlineexplicitconstexprnoexcept

Constructor.

Parameters
policiesFlushPolicy objects

Member Function Documentation

◆ empty()

constexpr bool sl::log::FlushPolicyChain< detail::TupleNoneOf , TFlushPolicies >::empty ( ) const
inlineconstexprnoexceptinherited

Returns whether the are no FlushPolicy objects attached.

Returns
true if there aren't have any FlushPolicy objects attached.

◆ flushed()

constexpr void sl::log::FlushPolicyChain< detail::TupleNoneOf , TFlushPolicies >::flushed ( )
inlineconstexprinherited

Calls flushed on all FlushPolicy objects.

◆ operator()()

bool sl::log::FlushPolicyChain< detail::TupleNoneOf , TFlushPolicies >::operator() ( const TRecord &  record,
std::size_t  messageByteSize 
)
inlineinherited

Invoke operator.

Template Parameters
TRecordUsed Record type
Parameters
recordThe current handled Record object
messageByteSizeThe 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()

constexpr std::size_t sl::log::FlushPolicyChain< detail::TupleNoneOf , TFlushPolicies >::size ( ) const
inlineconstexprnoexceptinherited

Obtains the amount of attached FlushPolicy objects.

Returns
The amount of attached FlushPolicy objects

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