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

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

#include <FlushPolicies.hpp>

Inheritance diagram for sl::log::FlushPolicyAllOf< TFlushPolicies >:
sl::log::FlushPolicyChain< detail::TupleAllOf, TFlushPolicies... >

Public Member Functions

constexpr FlushPolicyAllOf (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::FlushPolicyAllOf< TFlushPolicies >

Convenience type for chaining multiple FlushPolicies with AND.

Template Parameters
TFlushPoliciesType of provided FlushPolicy objects

Constructor & Destructor Documentation

◆ FlushPolicyAllOf()

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

Constructor.

Parameters
policiesFlushPolicy objects

Member Function Documentation

◆ empty()

constexpr bool sl::log::FlushPolicyChain< detail::TupleAllOf , 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::TupleAllOf , TFlushPolicies >::flushed ( )
inlineconstexprinherited

Calls flushed on all FlushPolicy objects.

◆ operator()()

bool sl::log::FlushPolicyChain< detail::TupleAllOf , 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::TupleAllOf , 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: